Skip to content

Commit

Permalink
[CMake] Replace OGS_BUILD_TESTS with BUILD_TESTING.
Browse files Browse the repository at this point in the history
BUILD_TESTING is a CMake convention used widely.
  • Loading branch information
bilke committed Feb 11, 2019
1 parent cfa47ea commit ac7308f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions CMakeLists.txt
Expand Up @@ -27,6 +27,7 @@ project( OGS-6 )

include(scripts/cmake/CMakeSetup.cmake)
include(ParseCMakeArgs)
include(CTest)

###########################
### Preliminary Options ###
Expand All @@ -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 "")
Expand Down Expand Up @@ -329,19 +329,19 @@ 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)
add_subdirectory( SimpleTests/MeshTests/MPI )
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"
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/test/AddTest.cmake
Expand Up @@ -39,7 +39,7 @@
# the benchmark output directory.

function (AddTest)
if(NOT OGS_BUILD_TESTS)
if(NOT BUILD_TESTING)
return()
endif()
# parse arguments
Expand Down
2 changes: 1 addition & 1 deletion scripts/cmake/test/OgsTest.cmake
@@ -1,5 +1,5 @@
function (OgsTest)
if(NOT OGS_BUILD_TESTS)
if(NOT BUILD_TESTING)
return()
endif()
set(options LARGE)
Expand Down
Expand Up @@ -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`.
Expand Down

0 comments on commit ac7308f

Please sign in to comment.