diff --git a/Applications/Utils/CMakeLists.txt b/Applications/Utils/CMakeLists.txt index 5fb663ed1cce554ffa1bc265ae1f4a873206e196..7138ca6f6f6c82f8845c6684a176f1adb41c50c1 100644 --- a/Applications/Utils/CMakeLists.txt +++ b/Applications/Utils/CMakeLists.txt @@ -14,6 +14,6 @@ if(OGS_BUILD_SWMM) add_subdirectory(SWMMConverter) endif() -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/CMakeLists.txt b/CMakeLists.txt index be9b0275d0add71a52775ffb72189c44e30bc510..dc1dea6cba3a906523e1ee6f0b32aec7b0d7240f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -73,6 +73,7 @@ if(OGS_USE_PETSC) endif() option(OGS_USE_CVODE "Use the Sundials CVODE module?" OFF) option(OGS_BUILD_UTILS "Should the utilities programs be built?" ON) +option(OGS_BUILD_TESTING "Should the tests be built?" ON) # ---- CMake includes ---- include(GitSetup) @@ -220,7 +221,7 @@ include(scripts/cmake/packaging/Pack.cmake) # ---- Subdirectories ---- # xdmfdiff -if(OGS_USE_XDMF AND BUILD_TESTING) +if(OGS_USE_XDMF AND OGS_BUILD_TESTING) add_subdirectory(Tests/xdmfdiff) endif() @@ -240,12 +241,12 @@ if(OGS_BUILD_PROCESS_ComponentTransport add_subdirectory(ChemistryLib) endif() -if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR BUILD_TESTING) +if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTING) add_subdirectory(ParameterLib) add_subdirectory(MaterialLib) add_subdirectory(ProcessLib) endif() -if(BUILD_TESTING AND NOT IS_SUBPROJECT) +if(OGS_BUILD_TESTING AND NOT IS_SUBPROJECT) add_subdirectory(Tests) endif() diff --git a/ProcessLib/ComponentTransport/CMakeLists.txt b/ProcessLib/ComponentTransport/CMakeLists.txt index c7e0c319ca0054df6d319e38712af0ea8cd69e10..20f45f1a2f7d34e908d9617a358eab7bbab588ea 100644 --- a/ProcessLib/ComponentTransport/CMakeLists.txt +++ b/ProcessLib/ComponentTransport/CMakeLists.txt @@ -4,6 +4,6 @@ ogs_add_library(ComponentTransport ${SOURCES}) target_link_libraries(ComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/HT/CMakeLists.txt b/ProcessLib/HT/CMakeLists.txt index 336db9e775ccc2b538723bcf77f9e05ae9b74743..17f027f19dab2860e14ae70156cb092dbbaef19d 100644 --- a/ProcessLib/HT/CMakeLists.txt +++ b/ProcessLib/HT/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(HT ${SOURCES}) target_link_libraries(HT PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/HT/Tests.cmake b/ProcessLib/HT/Tests.cmake index 5a21ae3e7bc5b5dfd5e3e43a9ff487fbcc645f98..a1d14b54c0bd34699672065bc685ec72df349e1c 100644 --- a/ProcessLib/HT/Tests.cmake +++ b/ProcessLib/HT/Tests.cmake @@ -449,7 +449,7 @@ AddTest( VIS ThermalConvection_ts_1_t_0.000000.vtu ) -if(NOT OGS_USE_MPI AND BUILD_TESTING AND Python3_FOUND) +if(NOT OGS_USE_MPI AND OGS_BUILD_TESTING AND Python3_FOUND) add_custom_target(generate_invalid_project_files_ht ${Python3_EXECUTABLE} ${PROJECT_SOURCE_DIR}/ThirdParty/ogs6py/generateInvalidMediaForHT.py diff --git a/ProcessLib/HeatConduction/CMakeLists.txt b/ProcessLib/HeatConduction/CMakeLists.txt index eeaa0e16318dc8f3a50d837424c67ac034f2a520..e5353ad4f3c35cccc36fc5dccc47389fc570442f 100644 --- a/ProcessLib/HeatConduction/CMakeLists.txt +++ b/ProcessLib/HeatConduction/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(HeatConduction ${SOURCES}) target_link_libraries(HeatConduction PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/HeatTransportBHE/CMakeLists.txt b/ProcessLib/HeatTransportBHE/CMakeLists.txt index 493279c2246e893c33ce41a417be9c38052aab97..746f01dcec3a2daae66ef55df2f620d7fb81b209 100644 --- a/ProcessLib/HeatTransportBHE/CMakeLists.txt +++ b/ProcessLib/HeatTransportBHE/CMakeLists.txt @@ -13,6 +13,6 @@ target_link_libraries(HeatTransportBHE $<$<TARGET_EXISTS:pybind11::pybind11>:pybind11::pybind11> ) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/HydroMechanics/CMakeLists.txt b/ProcessLib/HydroMechanics/CMakeLists.txt index 9b40804c791e7484244822543b0ed16e5f38b3d5..31004690cbf4b72349fb91e2ac49e2ece8d38b99 100644 --- a/ProcessLib/HydroMechanics/CMakeLists.txt +++ b/ProcessLib/HydroMechanics/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(HydroMechanics ${SOURCES}) target_link_libraries(HydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/LIE/CMakeLists.txt b/ProcessLib/LIE/CMakeLists.txt index e30ed86926d7f55e100c75a4cb80718e07ad5256..208129bcce77b6c079475daccfaf358e5c944809 100644 --- a/ProcessLib/LIE/CMakeLists.txt +++ b/ProcessLib/LIE/CMakeLists.txt @@ -7,7 +7,7 @@ append_source_files(SOURCES SmallDeformation/LocalAssembler) ogs_add_library(LIE ${SOURCES}) target_link_libraries(LIE PUBLIC ProcessLib LIECommon PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(HydroMechanics/Tests.cmake) include(SmallDeformation/Tests.cmake) endif() diff --git a/ProcessLib/LiquidFlow/CMakeLists.txt b/ProcessLib/LiquidFlow/CMakeLists.txt index 7a451eb2e3ff853a4362aca50bcd29d2b380de25..b7cd839b28bb5efe94466727bf24c2d11073f4d4 100644 --- a/ProcessLib/LiquidFlow/CMakeLists.txt +++ b/ProcessLib/LiquidFlow/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(LiquidFlow ${SOURCES}) target_link_libraries(LiquidFlow PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/PhaseField/CMakeLists.txt b/ProcessLib/PhaseField/CMakeLists.txt index 761ce0cfac040059d8ade7f281f63a6ede5150ba..34e13ba4029127928098f57805028090b4048601 100644 --- a/ProcessLib/PhaseField/CMakeLists.txt +++ b/ProcessLib/PhaseField/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(PhaseField ${SOURCES}) target_link_libraries(PhaseField PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/RichardsComponentTransport/CMakeLists.txt b/ProcessLib/RichardsComponentTransport/CMakeLists.txt index 18b0d9b405f364fbcd1ea44a2c9c4c645e7e0b1a..39a464cd941d1b8057a0f332270ddd292916e009 100644 --- a/ProcessLib/RichardsComponentTransport/CMakeLists.txt +++ b/ProcessLib/RichardsComponentTransport/CMakeLists.txt @@ -5,6 +5,6 @@ target_link_libraries(RichardsComponentTransport PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/RichardsFlow/CMakeLists.txt b/ProcessLib/RichardsFlow/CMakeLists.txt index 2e8665ebf02a491616620dc2c0ec624b65ac7f75..40fd6bfe7685bf5d23593da493a0b91214fb7b53 100644 --- a/ProcessLib/RichardsFlow/CMakeLists.txt +++ b/ProcessLib/RichardsFlow/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(RichardsFlow ${SOURCES}) target_link_libraries(RichardsFlow PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/RichardsMechanics/CMakeLists.txt b/ProcessLib/RichardsMechanics/CMakeLists.txt index a7f5cedb2c2f24cffe4256a9f81170094a970476..3606d05c6e8494a1f72e8c2054d27e07adedd813 100644 --- a/ProcessLib/RichardsMechanics/CMakeLists.txt +++ b/ProcessLib/RichardsMechanics/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(RichardsMechanics ${SOURCES}) target_link_libraries(RichardsMechanics PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/SmallDeformation/CMakeLists.txt b/ProcessLib/SmallDeformation/CMakeLists.txt index 7b0c2b5a30063dcb9fc99250848ec4f723c23181..166bdd2122a8087658da070707489b1bc678a55d 100644 --- a/ProcessLib/SmallDeformation/CMakeLists.txt +++ b/ProcessLib/SmallDeformation/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(SmallDeformation ${SOURCES}) target_link_libraries(SmallDeformation PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt index 06929dfbfc85c36458940efdc20f7c856d31be53..a889eb32405f7460e97ba414583cdeecc67eaf20 100644 --- a/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt +++ b/ProcessLib/SmallDeformationNonlocal/CMakeLists.txt @@ -5,6 +5,6 @@ target_link_libraries(SmallDeformationNonlocal PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/TES/CMakeLists.txt b/ProcessLib/TES/CMakeLists.txt index 7c10dc5c190b3c7de8bdaa528a92a86d413b386e..ac6d0d890a5bff229b9bde361a02d91b81c6a98e 100644 --- a/ProcessLib/TES/CMakeLists.txt +++ b/ProcessLib/TES/CMakeLists.txt @@ -4,6 +4,6 @@ ogs_add_library(TES ${SOURCES}) target_link_libraries(TES PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt index b799aebe18523baeba2c923d3dcf1756cde34ccb..1ce81cf428bddc5e2be27976739af6063eed6228 100644 --- a/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/ThermalTwoPhaseFlowWithPP/CMakeLists.txt @@ -9,6 +9,6 @@ target_link_libraries(ThermalTwoPhaseFlowWithPP PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/ThermoHydroMechanics/CMakeLists.txt b/ProcessLib/ThermoHydroMechanics/CMakeLists.txt index deb6548d49c1b33c94c8b7bb2a5607cc39152edd..e17771bb65ea3f12020d237d5ffea2a1656baa9a 100644 --- a/ProcessLib/ThermoHydroMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoHydroMechanics/CMakeLists.txt @@ -5,6 +5,6 @@ target_link_libraries(ThermoHydroMechanics PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt index 79d48e9fa0cd7ddd047f79a952c4d5936999f276..18d54925590afa7eed354f820f0d319e6ff98781 100644 --- a/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt +++ b/ProcessLib/ThermoMechanicalPhaseField/CMakeLists.txt @@ -5,6 +5,6 @@ target_link_libraries(ThermoMechanicalPhaseField PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/ThermoMechanics/CMakeLists.txt b/ProcessLib/ThermoMechanics/CMakeLists.txt index 930baf6e1f570b9d1a27c4079b836af78ea71e4d..b93baacd4fd8a59a96891abd4194b853bbd9837d 100644 --- a/ProcessLib/ThermoMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoMechanics/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(ThermoMechanics ${SOURCES}) target_link_libraries(ThermoMechanics PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/ThermoRichardsMechanics/CMakeLists.txt b/ProcessLib/ThermoRichardsMechanics/CMakeLists.txt index b7575274b49426840dbd365e3fccf6a117ac07ef..a43e38bd48e53a8c9841fc145e9854fb95a3b97d 100644 --- a/ProcessLib/ThermoRichardsMechanics/CMakeLists.txt +++ b/ProcessLib/ThermoRichardsMechanics/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(ThermoRichardsMechanics ${SOURCES}) target_link_libraries(ThermoRichardsMechanics PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt index bde2ca3eac0367ba13752fd123114af1278a7500..1ccb23a8a0965025f598b3ae55e2c97cac2d9bc7 100644 --- a/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPP/CMakeLists.txt @@ -3,6 +3,6 @@ get_source_files(SOURCES) ogs_add_library(TwoPhaseFlowWithPP ${SOURCES}) target_link_libraries(TwoPhaseFlowWithPP PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt index ef858c780f1c6f4995d71b71f3ff9128dba43b2c..211da79bcff66b2d5568a7abec863e12aacb153c 100644 --- a/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt +++ b/ProcessLib/TwoPhaseFlowWithPrho/CMakeLists.txt @@ -5,6 +5,6 @@ target_link_libraries(TwoPhaseFlowWithPrho PUBLIC ProcessLib PRIVATE ParameterLib) -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) include(Tests.cmake) endif() diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index 99b8f41ebffb53bec2db0836d6ee5e385b30ec70..d927738f572b9d229b7c67bba9122a27c2929b06 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -1,4 +1,4 @@ -if(BUILD_TESTING) +if(OGS_BUILD_TESTING) CPMAddPackage( NAME googletest GITHUB_REPOSITORY google/googletest diff --git a/scripts/cmake/PythonSetup.cmake b/scripts/cmake/PythonSetup.cmake index 9c681984790d0750b2cc96ddaed78229db1d0c4d..499baf4d51ab4f82b40a0df0d174c6db161f426d 100644 --- a/scripts/cmake/PythonSetup.cmake +++ b/scripts/cmake/PythonSetup.cmake @@ -43,7 +43,7 @@ set(LOCAL_VIRTUALENV_BIN_DIRS ) if(POETRY) - if(BUILD_TESTING) + if(OGS_BUILD_TESTING) list(APPEND PYTHON_PACKAGES snakemake=${ogs.minimum_version.snakemake}) endif() execute_process(COMMAND ${CMD_COMMAND} poetry add ${PYTHON_PACKAGES} diff --git a/scripts/cmake/test/MeshTest.cmake b/scripts/cmake/test/MeshTest.cmake index 0240f963dfa5026ad5944708ab419be75b31dc34..e27040f8a2d514dbb42107035395f86c42f15a09 100644 --- a/scripts/cmake/test/MeshTest.cmake +++ b/scripts/cmake/test/MeshTest.cmake @@ -17,7 +17,7 @@ # ) function (MeshTest) - if(NOT BUILD_TESTING) + if(NOT OGS_BUILD_TESTING) return() endif() # parse arguments diff --git a/scripts/cmake/test/OgsTest.cmake b/scripts/cmake/test/OgsTest.cmake index bcf10c5181f5ff6f2a66a7b5958824e587fa349a..efc854e1698513fc2e880d1a7b1802946ff85c13 100644 --- a/scripts/cmake/test/OgsTest.cmake +++ b/scripts/cmake/test/OgsTest.cmake @@ -1,6 +1,6 @@ function (OgsTest) - if(NOT OGS_BUILD_CLI OR NOT BUILD_TESTING) + if(NOT OGS_BUILD_CLI OR NOT OGS_BUILD_TESTING) return() endif() set(options DISABLED) diff --git a/web/content/docs/devguide/advanced/configuration-options.md b/web/content/docs/devguide/advanced/configuration-options.md index 8b470fc2e95852cbfbf9b6ba92203c2c11da7da1..317a5fb1cdfb46b368cb11cc7899df88b3f9065f 100644 --- a/web/content/docs/devguide/advanced/configuration-options.md +++ b/web/content/docs/devguide/advanced/configuration-options.md @@ -19,7 +19,7 @@ CMake switches to enable / disable parts of OGS. - `OGS_BUILD_CLI` - Builds the simulator. *Defaults* to *ON*. If set to *OFF* all processes are also disabled. - `OGS_BUILD_GUI` - Builds the Data Explorer. *Defaults* to *OFF*. -- `BUILD_TESTING` - Builds the test executables. *Defaults* to *ON*. +- `OGS_BUILD_TESTING` - Builds the test executables. *Defaults* to *ON*. - `OGS_BUILD_UTILS` - Builds several utilities. - `OGS_NO_EXTERNAL_LIBS` - Disables all external optional dependencies. - `OGS_BUILD_PROCESS_X` - For enabling/disabling compilation of process `X`.