From 6707e801a8c7a9d4c250ec7e80ea819babb1adea Mon Sep 17 00:00:00 2001 From: kvrigor Date: Sat, 11 Nov 2023 11:34:16 +0100 Subject: [PATCH] Installed header files --- CMakeLists.txt | 5 ++ pfsimulator/amps/CMakeLists.txt | 6 +++ pfsimulator/parflow_lib/CMakeLists.txt | 64 ++++++++++++++++++++++++++ 3 files changed, 75 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index bb45fc071..9d7a42ac2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -12,6 +12,7 @@ set (CMAKE_C_STANDARD 11) include (CheckCCompilerFlag) include (CheckCXXCompilerFlag) +include(GNUInstallDirs) # Check if compiler supports extra debugging flags foreach (DEBUG_FLAG "-ggdb" "-g3") @@ -546,6 +547,10 @@ if ( ${PARFLOW_HAVE_CLM} ) configure_file (pfsimulator/clm/parflow_config.F90.in ${PROJECT_BINARY_DIR}/pfsimulator/clm/parflow_config.F90) endif ( ${PARFLOW_HAVE_CLM} ) +# Install headers +install(FILES ${CMAKE_BINARY_DIR}/include/parflow_config.h + ${CMAKE_BINARY_DIR}/include/pfversion.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/parflow) #----------------------------------------------------------------------------- # CMAKE Subdirectories #----------------------------------------------------------------------------- diff --git a/pfsimulator/amps/CMakeLists.txt b/pfsimulator/amps/CMakeLists.txt index 35cdacce1..b626e6de6 100644 --- a/pfsimulator/amps/CMakeLists.txt +++ b/pfsimulator/amps/CMakeLists.txt @@ -46,5 +46,11 @@ set(AMPS_SCRIPTS run) string(REGEX REPLACE "([^;]+)" "${PARFLOW_AMPS_LAYER}/\\1" AMPS_SCRIPTS "${AMPS_SCRIPTS}") install(FILES ${AMPS_SCRIPTS} DESTINATION bin) +# Install headers +install(FILES common/amps_common.h + ${PARFLOW_AMPS_LAYER}/amps.h + ${PARFLOW_AMPS_LAYER}/amps_proto.h + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/parflow) + add_subdirectory (test/src) diff --git a/pfsimulator/parflow_lib/CMakeLists.txt b/pfsimulator/parflow_lib/CMakeLists.txt index 206a157ca..d09385305 100644 --- a/pfsimulator/parflow_lib/CMakeLists.txt +++ b/pfsimulator/parflow_lib/CMakeLists.txt @@ -282,3 +282,67 @@ if (${PARFLOW_HAVE_NETCDF}) target_include_directories (pfsimulator PUBLIC "${netCDF_INCLUDE_DIRS}") target_include_directories (pfsimulator PUBLIC "${NETCDF_INCLUDE_DIRS}") endif (${PARFLOW_HAVE_NETCDF}) + +# Install headers +set (HEADER_FILES + backend_mapping.h + background.h + bc_pressure.h + char_vector.h + clustering.h + communication.h + computation.h + drv_gridmodule.h + drv_module.h + drv_tilemodule.h + f2c.h + fgetopt.h + file_versions.h + general.h + geometry.h + geostats.h + globals.h + grgeometry.h + grgeom_list.h + grgeom_octree.h + grid.h + hbt.h + hypre_dependences.h + index_space.h + info_header.h + input_database.h + kinsol_dependences.h + lb.h + llnlmath.h + llnltyps.h + logging.h + loops.h + matrix.h + metadata.h + nl_function_eval.h + n_vector.h + parflow.h + parflow_netcdf.h + parflow_proto_f90.h + parflow_proto_f.h + parflow_proto.h + pf_cudaloops.h + pf_cudamalloc.h + pf_devices.h + pf_hypre.h + pf_kokkosloops.h + pf_kokkosmalloc.h + pf_module.h + pf_omploops.h + problem_bc.h + problem_eval.h + problem.h + region.h + solver.h + time_cycle_data.h + timing.h + vector.h + well.h +) +install(FILES ${HEADER_FILES} + DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/parflow)