@@ -19,10 +19,28 @@ set(TARGET_ALIAS ${TARGET_NAMESPACE}::${TARGET_NAME})
1919set(TARGET_PACKAGE_NAME ${PROJECT_NAME}-config)
2020set(TARGETS_EXPORT_NAME ${PROJECT_NAME}-targets)
2121
22+ option(
23+ BEMAN_EXECUTION26_ENABLE_TESTING
24+ "Enable building tests and test infrastructure. Values : { ON, OFF }."
25+ ${PROJECT_IS_TOP_LEVEL}
26+ )
27+
28+ option(
29+ BEMAN_EXECUTION26_BUILD_EXAMPLES
30+ "Enable building examples. Values : { ON, OFF }."
31+ ${PROJECT_IS_TOP_LEVEL}
32+ )
33+
34+ option(
35+ BEMAN_EXECUTION26_ENABLE_INSTALL
36+ "Install the project components. Values : { ON, OFF }."
37+ ${PROJECT_IS_TOP_LEVEL}
38+ )
39+
2240include (GNUInstallDirs)
2341set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
2442
25- if(CMAKE_BUILD_TYPE STREQUAL xDebug )
43+ if(NOT BEMAN_EXECUTION26_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES )
2644 include (FetchContent)
2745
2846 # Add project_options from https://github.com/aminya/project_options
@@ -73,13 +91,20 @@ endif()
7391
7492add_subdirectory(src/beman/execution26)
7593
76- if(PROJECT_IS_TOP_LEVEL )
94+ if(BEMAN_EXECUTION26_ENABLE_TESTING )
7795 enable_testing()
7896
7997 add_subdirectory(tests/beman/execution26)
98+ endif()
99+
100+ if(BEMAN_EXECUTION26_BUILD_EXAMPLES)
80101 add_subdirectory(examples)
81102endif()
82103
104+ if(NOT BEMAN_EXECUTION26_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
105+ return()
106+ endif()
107+
83108include (CMakePackageConfigHelpers)
84109
85110write_basic_package_version_file(
0 commit comments