Skip to content

Commit

Permalink
Flag for test build
Browse files Browse the repository at this point in the history
  • Loading branch information
bhourahine committed May 8, 2022
1 parent 49d3c97 commit 9f812ae
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
7 changes: 5 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9f812ae

Please sign in to comment.