Skip to content
Snippets Groups Projects
Commit ac7308fb authored by Lars Bilke's avatar Lars Bilke
Browse files

[CMake] Replace OGS_BUILD_TESTS with BUILD_TESTING.

BUILD_TESTING is a CMake convention used widely.
parent cfa47ea1
No related branches found
No related tags found
No related merge requests found
......@@ -27,6 +27,7 @@ project( OGS-6 )
include(scripts/cmake/CMakeSetup.cmake)
include(ParseCMakeArgs)
include(CTest)
###########################
### Preliminary Options ###
......@@ -37,7 +38,6 @@ set(CMAKE_LIBRARY_SEARCH_PATH "" CACHE PATH
set(OGS_CPU_ARCHITECTURE "native" CACHE STRING "Processor architecture, \
defaults to native (*nix) / blend (MSVC).")
option(OGS_ENABLE_AVX2 "Enable the use of AVX2 instructions" OFF)
option(OGS_BUILD_TESTS "Should the test executables be built?" ON)
option(OGS_USE_PCH "Should pre-compiled headers be used?" ON)
if(DEFINED CMAKE_CXX_CLANG_TIDY)
set(OGS_USE_PCH OFF CACHE INTERNAL "")
......@@ -329,11 +329,11 @@ add_subdirectory( MathLib )
add_subdirectory( MeshLib )
add_subdirectory( MeshGeoToolsLib )
add_subdirectory( NumLib )
if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR OGS_BUILD_TESTS)
if(OGS_BUILD_CLI OR OGS_BUILD_UTILS OR BUILD_TESTING)
add_subdirectory( MaterialLib )
add_subdirectory( ProcessLib )
endif()
if( OGS_BUILD_TESTS AND NOT IS_SUBPROJECT )
if( BUILD_TESTING AND NOT IS_SUBPROJECT )
add_subdirectory( Tests )
if(OGS_USE_MPI)
......@@ -341,7 +341,7 @@ if( OGS_BUILD_TESTS AND NOT IS_SUBPROJECT )
else()
add_subdirectory( SimpleTests/MeshTests )
endif()
endif() # OGS_BUILD_TESTS
endif()
# The configuration must be called from the source dir and not BaseLib/.
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/BaseLib/BuildInfo.cpp.in"
......
......@@ -39,7 +39,7 @@
# the benchmark output directory.
function (AddTest)
if(NOT OGS_BUILD_TESTS)
if(NOT BUILD_TESTING)
return()
endif()
# parse arguments
......
function (OgsTest)
if(NOT OGS_BUILD_TESTS)
if(NOT BUILD_TESTING)
return()
endif()
set(options LARGE)
......
......@@ -19,7 +19,7 @@ CMake switches to enable / disable parts of OGS.
- `OGS_BUILD_CLI` - Builds the simulator. *Defaults* to *ON*.
- `OGS_BUILD_GUI` - Builds the Data Explorer. *Defaults* to *OFF*.
- `OGS_BUILD_TESTS` - Builds the test executables. *Defaults* to *ON*.
- `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`.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment