Skip to content

Commit a8d2b34

Browse files
authored
Only if PROJECT_IS_TOP_LEVEL use project_options (#139)
1 parent 9cd2e66 commit a8d2b34

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,9 @@ option(
4040
include(GNUInstallDirs)
4141
set(INSTALL_CONFIGDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME})
4242

43-
if(NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
43+
if(PROJECT_IS_TOP_LEVEL AND NOT BEMAN_EXECUTION_ENABLE_INSTALL OR CMAKE_SKIP_INSTALL_RULES)
44+
set(CMAKE_SKIP_INSTALL_RULES ON)
45+
4446
include(FetchContent)
4547

4648
# Add project_options from https://github.com/aminya/project_options

tests/beman/execution/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ if(PROJECT_IS_TOP_LEVEL)
114114
if(beman_execution_FOUND)
115115
set(execution_tests exec-awaitable.test) # only one sample to save time! CK
116116
else()
117+
set(BEMAN_EXECUTION_ENABLE_INSTALL ON)
117118
add_subdirectory(../../.. beman_execution)
118119

119120
include(CMakePrintHelpers)

0 commit comments

Comments
 (0)