We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
CCCL_TOPLEVEL_PROJECT
OFF
1 parent 7d389d4 commit b8327e2Copy full SHA for b8327e2
CMakeLists.txt
@@ -9,8 +9,15 @@ endif()
9
10
# Determine whether CCCL is the top-level project or included into
11
# another project via add_subdirectory()
12
-if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
13
- set(CCCL_TOPLEVEL_PROJECT ON)
+
+if (NOT DEFINED CCCL_TOPLEVEL_PROJECT)
14
+ # DO NOT REMOVE THE FOLLOWING LINE
15
+ set(CCCL_TOPLEVEL_PROJECT OFF)
16
+ # REQUIRED FOR CCCL TO WORK VIA CPM WITH INSTALL RULES
17
18
+ if ("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_CURRENT_LIST_DIR}")
19
+ set(CCCL_TOPLEVEL_PROJECT ON)
20
+ endif()
21
endif()
22
23
# Enable CXX so CMake can configure install paths
0 commit comments