@@ -27,8 +27,11 @@ option(BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS
2727 "Make use of C++23 \" deducing this\" feature (P0847R7). Turn this off for non-conforming compilers."
2828 ${COMPILER_SUPPORTS_DEDUCING_THIS} )
2929
30- option (ITERATOR_INTERFACE_ENABLE_TESTING
31- "Enable building tests and test infrastructure" ${PROJECT_IS_TOP_LEVEL} )
30+ option (ITERATOR_INTERFACE_BUILD_TESTING
31+ "Enable building tests and test infrastructure. Default: ON. Values: {ON, OFF}." ${PROJECT_IS_TOP_LEVEL} )
32+
33+ option (ITERATOR_INTERFACE_BUILD_EXAMPLES
34+ "Enable building examples. Default: ON. Values: {ON, OFF}." ${PROJECT_IS_TOP_LEVEL} )
3235
3336if (BEMAN_ITERATOR_INTERFACE_USE_DEDUCING_THIS
3437 AND NOT COMPILER_SUPPORTS_DEDUCING_THIS)
@@ -42,8 +45,8 @@ configure_file(
4245 "${PROJECT_SOURCE_DIR} /include/beman/iterator_interface/config.hpp.in"
4346 "${PROJECT_BINARY_DIR} /include/beman/iterator_interface/config.hpp" @ONLY)
4447
45- # Build the tests if enabled via the option ITERATOR_INTERFACE_ENABLE_TESTING
46- if (ITERATOR_INTERFACE_ENABLE_TESTING )
48+ # Build the tests if enabled via the option ITERATOR_INTERFACE_BUILD_TESTING
49+ if (ITERATOR_INTERFACE_BUILD_TESTING )
4750 # Fetch GoogleTest
4851 FetchContent_Declare(
4952 googletest
@@ -79,11 +82,16 @@ target_include_directories(
7982add_subdirectory (src/beman/iterator_interface)
8083add_subdirectory (include /beman/iterator_interface)
8184
82- add_subdirectory (examples)
83- if (ITERATOR_INTERFACE_ENABLE_TESTING )
85+ # [CMAKE.SKIP_TESTS]
86+ if (ITERATOR_INTERFACE_BUILD_TESTING )
8487 add_subdirectory (tests/beman/iterator_interface)
8588endif ()
8689
90+ # [CMAKE.SKIP_EXAMPLES]
91+ if (ITERATOR_INTERFACE_BUILD_EXAMPLES)
92+ add_subdirectory (examples)
93+ endif ()
94+
8795# Coverage
8896configure_file ("cmake/gcovr.cfg.in" gcovr.cfg @ONLY)
8997
0 commit comments