diff --git a/CHANGELOG.rst b/CHANGELOG.rst index d1f6f293be385c89cb5203026f356a79b9227c44..f53a29d18f9a9b427d86fdec10c6241ea29dc365 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,8 @@ Version 0.9 Version 0.9.2 ************* +- Feature: Integration tests are only generated if ``CM_ALL_TESTS_INTEGRATION`` + is set. - Feature: Example CMake and Make projects for integrating ALL into the build process. - Bug: CMake dependencies between targets and link and include inheritance diff --git a/CMakeLists.txt b/CMakeLists.txt index b533ab5d04362c93a901d1de84da97e0bc3a79f3..d5414b1a068f3da20c0fd65b6ba3278c38a14205 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,7 @@ option(CM_ALL_USE_F08 "Use some Fortran 2008 features (mpi_f08)" OFF) option(CM_ALL_FORTRAN_ERROR_ABORT "Abort on any error when using the Fortran interface" OFF) option(CM_ALL_TESTS "Enables test suite" OFF) +option(CM_ALL_TESTS_INTEGRATION "Enables integration tests" OFF) option(CM_ALL_AUTO_DOC "Enables creation of auto-documentation") # leading and trailing whitespace should be silently ignored @@ -109,6 +110,11 @@ if(CM_ALL_VORONOI) message(STATUS "compiling voro++ version in contrib/voro++") add_subdirectory(contrib/voro++) endif() +if(CM_ALL_TESTS_INTEGRATION) + if(NOT CM_ALL_TESTS) + message(WARNING "Integration tests enabled, but testing itself not. No tests will be generated!") + endif() +endif() set(STB_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/contrib/stb) diff --git a/docs/Install.rst b/docs/Install.rst index af003718a2b9d4637decfc4d3c56918842291cff..6170bee196ee3687b15be61e83a1369e2ff812ca 100644 --- a/docs/Install.rst +++ b/docs/Install.rst @@ -50,9 +50,14 @@ Compile time features ``-DCM_ALL_VORONOI=ON`` (default: ``OFF``) Enable Voronoi mesh method and subsequently compilation and linkage of Voro++. -``-DCM_ALL_TESTING=ON`` (default: ``OFF``) - Turns on unit and feature tests. Can be run from the build directory - with ``ctest``. Requires the Boost test utilities. +``-DCM_ALL_TESTS=ON`` (default: ``OFF``) + Turns on generation of tests. Will only generate unit tests by default + and additional tests can be enabled with other flags, see below. Tests + can be run from the build directory with ``ctest``. Requires the Boost + test utilities. +``-DCM_ALL_TESTS_INTEGRATION=ON`` (default: ``OFF``) + Enables integration/feature tests. Requires ``CM_ALL_TESTS`` to be + enabled as well. ``-DCMAKE_BUILD_TYPE=Debug`` (default: ``Release``) Enable library internal debugging features. Using ``DebugWithOpt`` also turns on some optimizations. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 7594f52b62b84dd26d294b0091b67968cbee9ac2..67946b019d1dafb26ccf88b105a758147865a308 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1,2 +1,5 @@ add_subdirectory(unit) -add_subdirectory(feature) +if(CM_ALL_TESTS_INTEGRATION) + add_subdirectory(feature) +endif() +# vim: sw=4 ts=4 et