diff --git a/Applications/ApplicationsLib/CMakeLists.txt b/Applications/ApplicationsLib/CMakeLists.txt index a0bbc6d0eb0276080e7d675c7519973903084ce6..1987e809d218093d1645170621a3742bbd2e1b01 100644 --- a/Applications/ApplicationsLib/CMakeLists.txt +++ b/Applications/ApplicationsLib/CMakeLists.txt @@ -10,7 +10,7 @@ endif() target_link_libraries(ApplicationsLib PUBLIC BaseLib GeoLib Processes logog - PRIVATE MathLib MeshLib MeshGeoToolsLib NumLib + PRIVATE MathLib MeshLib MeshGeoToolsLib NumLib ParameterLib ) # Set cpp definitions if the cmake option is enabled for the given process. diff --git a/CMakeLists.txt b/CMakeLists.txt index f8194ee32cf823920ffb0bbd8b92e0100705f52e..8151513714f9be3927c8cc0da9530567a4fe80d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -333,6 +333,7 @@ add_subdirectory( MeshLib ) add_subdirectory( MeshGeoToolsLib ) add_subdirectory( NumLib ) if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR BUILD_TESTING) + add_subdirectory( ParameterLib ) add_subdirectory( MaterialLib ) add_subdirectory( ProcessLib ) endif() diff --git a/MaterialLib/CMakeLists.txt b/MaterialLib/CMakeLists.txt index 89f4ed54c2866a3cbf9a431e26c8930778f9a08d..7b7893c63c40e627a8512e383850cb0429d9977a 100644 --- a/MaterialLib/CMakeLists.txt +++ b/MaterialLib/CMakeLists.txt @@ -39,8 +39,8 @@ target_include_directories(MaterialLib ) target_link_libraries(MaterialLib - PUBLIC MaterialLib_SolidModels_MFront # ProcessLib - PRIVATE MathLib MeshLib + PUBLIC MaterialLib_SolidModels_MFront + PRIVATE MathLib MeshLib ParameterLib ) if(OGS_USE_PCH) diff --git a/ParameterLib/CMakeLists.txt b/ParameterLib/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..857be4c14f894b64dcde14ebb56845a4d783b822 --- /dev/null +++ b/ParameterLib/CMakeLists.txt @@ -0,0 +1,19 @@ +# Source files +get_source_files(SOURCES) + +add_library(ParameterLib ${SOURCES}) +if(BUILD_SHARED_LIBS) + install(TARGETS ParameterLib LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) +endif() + +include(GenerateExportHeader) +generate_export_header(ParameterLib) +target_include_directories(ParameterLib + PUBLIC ${CMAKE_CURRENT_BINARY_DIR} +) + +target_link_libraries(ParameterLib PRIVATE BaseLib MeshLib) + +if(OGS_USE_PCH) + cotire(ParameterLib) +endif() diff --git a/ProcessLib/CMakeLists.txt b/ProcessLib/CMakeLists.txt index 162ba4aacc5185ee79e8b4ad4f3c706984316932..eaae9cbab5f7ad8657a8ff2cbc638f2a2a2c712e 100644 --- a/ProcessLib/CMakeLists.txt +++ b/ProcessLib/CMakeLists.txt @@ -15,7 +15,6 @@ APPEND_SOURCE_FILES(SOURCES) APPEND_SOURCE_FILES(SOURCES BoundaryCondition) APPEND_SOURCE_FILES(SOURCES SurfaceFlux) APPEND_SOURCE_FILES(SOURCES Output) -APPEND_SOURCE_FILES(SOURCES Parameter) APPEND_SOURCE_FILES(SOURCES SourceTerms) APPEND_SOURCE_FILES(SOURCES Utils) @@ -25,7 +24,16 @@ if(BUILD_SHARED_LIBS) endif() target_link_libraries(ProcessLib - PUBLIC BaseLib MaterialLib MathLib MeshLib NumLib logog MeshGeoToolsLib + PUBLIC + BaseLib + MaterialLib + MathLib + MeshGeoToolsLib + MeshLib + NumLib + logog + PRIVATE + ParameterLib ) if(OGS_USE_PYTHON) diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt index 0b90efa851b2a1bfa9101674341b65f3d6012e0c..15a0a6a3c54b221d2da26472c72344de90303e29 100644 --- a/ProcessLib/ComponentTransport/CMakeLists.txt +++ b/ProcessLib/ComponentTransport/CMakeLists.txt @@ -7,6 +7,7 @@ endif() target_link_libraries(ComponentTransport PUBLIC ProcessLib + PRIVATE ParameterLib ) include(Tests.cmake) diff --git a/ProcessLib/GroundwaterFlow/CMakeLists.txt b/ProcessLib/GroundwaterFlow/CMakeLists.txt index b60fc65b178c3b2b4b210a034cfdfbc41415e9a3..c2aa630efeb6d20e878a5497ba0f7f526d104e43 100644 --- a/ProcessLib/GroundwaterFlow/CMakeLists.txt +++ b/ProcessLib/GroundwaterFlow/CMakeLists.txt @@ -7,6 +7,7 @@ endif() target_link_libraries(GroundwaterFlow PUBLIC ProcessLib + PRIVATE ParameterLib ) include(Tests.cmake) diff --git a/ProcessLib/HT/CMakeLists.txt b/ProcessLib/HT/CMakeLists.txt index 0adfff1a8c7d0074814fcb0a09c0f5672fc37be7..1cf1581847e218a58452bd21cf1f249545c069a4 100644 --- a/ProcessLib/HT/CMakeLists.txt +++ b/ProcessLib/HT/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(HT ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS HT LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(HT PUBLIC ProcessLib) +target_link_libraries(HT + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/HeatConduction/CMakeLists.txt b/ProcessLib/HeatConduction/CMakeLists.txt index d254ac48d5593c99de3c32811d2f3b825781d51e..5b1b842b98b83b0b5960dcc78ea090f9a6a5837c 100644 --- a/ProcessLib/HeatConduction/CMakeLists.txt +++ b/ProcessLib/HeatConduction/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(HeatConduction ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS HeatConduction LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(HeatConduction PUBLIC ProcessLib) +target_link_libraries(HeatConduction + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/HeatTransportBHE/CMakeLists.txt b/ProcessLib/HeatTransportBHE/CMakeLists.txt index df2b08f43964b5c5535834342543fd056eea6333..76f61d448c91b312dccc5c228465d434d5938611 100644 --- a/ProcessLib/HeatTransportBHE/CMakeLists.txt +++ b/ProcessLib/HeatTransportBHE/CMakeLists.txt @@ -3,9 +3,12 @@ APPEND_SOURCE_FILES(SOURCES BHE) APPEND_SOURCE_FILES(SOURCES LocalAssemblers) add_library(HeatTransportBHE ${SOURCES}) -target_link_libraries(HeatTransportBHE PUBLIC ProcessLib) if(BUILD_SHARED_LIBS) install(TARGETS HeatTransportBHE LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() +target_link_libraries(HeatTransportBHE + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/HydroMechanics/CMakeLists.txt b/ProcessLib/HydroMechanics/CMakeLists.txt index abd91957bfbd49272c4a49101081df12e33cbc87..924a3aec796c880dea61704475e70f2f53092ea6 100644 --- a/ProcessLib/HydroMechanics/CMakeLists.txt +++ b/ProcessLib/HydroMechanics/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(HydroMechanics ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS HydroMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(HydroMechanics PUBLIC ProcessLib) +target_link_libraries(HydroMechanics + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/LIE/CMakeLists.txt b/ProcessLib/LIE/CMakeLists.txt index f8057b51edca3a641ff9f80e2b42fc4884b19add..8f82689a0e2fb74a6df19c514f3fb0e013b35e48 100644 --- a/ProcessLib/LIE/CMakeLists.txt +++ b/ProcessLib/LIE/CMakeLists.txt @@ -8,7 +8,10 @@ add_library(LIE ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS LIE LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(LIE PUBLIC ProcessLib LIECommon) +target_link_libraries(LIE + PUBLIC ProcessLib LIECommon + PRIVATE ParameterLib +) include(HydroMechanics/Tests.cmake) include(SmallDeformation/Tests.cmake) diff --git a/ProcessLib/LiquidFlow/CMakeLists.txt b/ProcessLib/LiquidFlow/CMakeLists.txt index b6a430d96d2d33749bff5253cadea6ad9b9c9ea8..ff8694cc576af6e9f0fcabea5a591636685d6560 100644 --- a/ProcessLib/LiquidFlow/CMakeLists.txt +++ b/ProcessLib/LiquidFlow/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(LiquidFlow ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS LiquidFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(LiquidFlow PUBLIC ProcessLib) +target_link_libraries(LiquidFlow + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/PhaseField/CMakeLists.txt b/ProcessLib/PhaseField/CMakeLists.txt index d3575e49e7e03d07dbc2ba61dc9df7d102ade163..03c6de7205b747233cd055394adca8f800276105 100644 --- a/ProcessLib/PhaseField/CMakeLists.txt +++ b/ProcessLib/PhaseField/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(PhaseField ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS PhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(PhaseField PUBLIC ProcessLib) +target_link_libraries(PhaseField + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/RichardsComponentTransport/CMakeLists.txt b/ProcessLib/RichardsComponentTransport/CMakeLists.txt index 1ea94214a510b4a1be06bad769b1ee74507807ea..1727d5762755dc26cde5b83cad7bca70bc88e626 100644 --- a/ProcessLib/RichardsComponentTransport/CMakeLists.txt +++ b/ProcessLib/RichardsComponentTransport/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(RichardsComponentTransport ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS RichardsComponentTransport LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(RichardsComponentTransport PUBLIC ProcessLib) +target_link_libraries(RichardsComponentTransport + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/RichardsFlow/CMakeLists.txt b/ProcessLib/RichardsFlow/CMakeLists.txt index ce0770b754636661f24682070520a97fa363b77f..e0cf9f1684c62e3a2e3a86e017c0244fc998067c 100644 --- a/ProcessLib/RichardsFlow/CMakeLists.txt +++ b/ProcessLib/RichardsFlow/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(RichardsFlow ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS RichardsFlow LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(RichardsFlow PUBLIC ProcessLib) +target_link_libraries(RichardsFlow + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/RichardsMechanics/CMakeLists.txt b/ProcessLib/RichardsMechanics/CMakeLists.txt index 6886684b525c2b643810403c4e5acfffa9e027f3..8dc36b502aa066f28f82943259ae5c44a7a2cc2c 100644 --- a/ProcessLib/RichardsMechanics/CMakeLists.txt +++ b/ProcessLib/RichardsMechanics/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(RichardsMechanics ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS RichardsMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(RichardsMechanics PUBLIC ProcessLib RichardsFlow) +target_link_libraries(RichardsMechanics + PUBLIC ProcessLib + PRIVATE RichardsFlow ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/SmallDeformation/CMakeLists.txt b/ProcessLib/SmallDeformation/CMakeLists.txt index a2fee7f8872cba77dc5c3db006a557e3efaaf2a9..462c3245b63dabed9df2945d1f457d61bb16a44f 100644 --- a/ProcessLib/SmallDeformation/CMakeLists.txt +++ b/ProcessLib/SmallDeformation/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(SmallDeformation ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS SmallDeformation LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(SmallDeformation PUBLIC ProcessLib) +target_link_libraries(SmallDeformation + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt index f99ef53c547de078cdd9a0d49275a1a88629a72c..dc507d89e8818c2866717b942960911717cbed81 100644 --- a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt +++ b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt @@ -1,6 +1,9 @@ APPEND_SOURCE_FILES(SOURCES) add_library(SmallDeformationNonlocal ${SOURCES}) -target_link_libraries(SmallDeformationNonlocal PUBLIC ProcessLib) +target_link_libraries(SmallDeformationNonlocal + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/TES/CMakeLists.txt b/ProcessLib/TES/CMakeLists.txt index d1632b690167d971df4d44c2c2755564a2ab22cc..afa13b23b39d63a90bac893c646546a2ac800bc0 100644 --- a/ProcessLib/TES/CMakeLists.txt +++ b/ProcessLib/TES/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(TES ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS TES LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(TES PUBLIC ProcessLib) +target_link_libraries(TES + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt index 3c5d458490fd6540cd08afc62c61d8c5c6350b30..9f2c0e4977828c78953999dc6eccdd1fb578a089 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(ThermalTwoPhaseFlowWithPP ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS ThermalTwoPhaseFlowWithPP LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(ThermalTwoPhaseFlowWithPP PUBLIC ProcessLib) +target_link_libraries(ThermalTwoPhaseFlowWithPP + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt index d13bd372521a1cd80b1562b4ca2ef186a97cf59b..9151b31a37f2f8e90ed9f7272605f2e23a1081b6 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt +++ b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(ThermoMechanicalPhaseField ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS ThermoMechanicalPhaseField LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(ThermoMechanicalPhaseField PUBLIC ProcessLib) +target_link_libraries(ThermoMechanicalPhaseField + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/ThermoMechanics/CMakeLists.txt b/ProcessLib/ThermoMechanics/CMakeLists.txt index 7368f6f8d2e09f33211fdc24f195f567049c0e95..7b4955907f37fca219756b148c24d119b568052a 100644 --- a/ProcessLib/ThermoMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoMechanics/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(ThermoMechanics ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS ThermoMechanics LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(ThermoMechanics PUBLIC ProcessLib) +target_link_libraries(ThermoMechanics + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt index 5b194400ac17e0cda531ce73db8b424c77ee175e..8196b7acf38ea1d9dedaa5b6f25276dab5504b47 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(TwoPhaseFlowWithPP ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS TwoPhaseFlowWithPP LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(TwoPhaseFlowWithPP PUBLIC ProcessLib) +target_link_libraries(TwoPhaseFlowWithPP + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt index 0574fb24517a72c4a6f5883d311bd99062d08d62..ed415c5f7ddbaa20e1d0d60137db6ec0621570ea 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt @@ -4,6 +4,9 @@ add_library(TwoPhaseFlowWithPrho ${SOURCES}) if(BUILD_SHARED_LIBS) install(TARGETS TwoPhaseFlowWithPrho LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}) endif() -target_link_libraries(TwoPhaseFlowWithPrho PUBLIC ProcessLib) +target_link_libraries(TwoPhaseFlowWithPrho + PUBLIC ProcessLib + PRIVATE ParameterLib +) include(Tests.cmake) diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index 41f20990209c270754d06fd9774193af48aba5c8..5809f6e4c276f7ae1bc56cdc3518635f7c98dab6 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -16,6 +16,7 @@ APPEND_SOURCE_FILES(TEST_SOURCES MathLib) APPEND_SOURCE_FILES(TEST_SOURCES MeshLib) APPEND_SOURCE_FILES(TEST_SOURCES MeshGeoToolsLib) APPEND_SOURCE_FILES(TEST_SOURCES NumLib) +APPEND_SOURCE_FILES(TEST_SOURCES ParameterLib) APPEND_SOURCE_FILES(TEST_SOURCES ProcessLib) if(Qt5XmlPatterns_FOUND) @@ -44,6 +45,7 @@ target_link_libraries(testrunner MaterialLib MeshLib NumLib + ParameterLib ProcessLib Threads::Threads ${VTK_LIBRARIES}