diff --git a/CMakeLists.txt b/CMakeLists.txt index a7cffc6..e08c745 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,7 @@ endif() include(GNUInstallDirs) add_subdirectory(lib) -if(NOT BUILD_EXPORTED_TARGETS_ONLY) +if(NOT BUILD_EXPORTED_TARGETS_ONLY AND BUILD_TESTING) enable_testing() add_subdirectory(test) endif() diff --git a/README.rst b/README.rst index e40d884..2c1d012 100644 --- a/README.rst +++ b/README.rst @@ -45,8 +45,11 @@ or pass them as command line options at the configuration phase, e.g.:: Testing ------- -A few tests / usage examples can be found in the `test/` subdirectory. The -compiled test programs will be in the `test/` subfolder of your build directory. +A few tests / usage examples can be found in the `test/` subdirectory, +a sub-set of which can be checked with ctest. The compiled test +programs will be in the `test/` subfolder of your build directory. + +To enable building, include the cmake option -DBUILD_TESTING=ON Using the library