mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-03 04:03:23 +03:00
This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
7 lines
191 B
CMake
7 lines
191 B
CMake
get_property(role GLOBAL PROPERTY CMAKE_ROLE)
|
|
if(NOT role STREQUAL "PROJECT")
|
|
message(SEND_ERROR "CMAKE_ROLE property is \"${role}\", should be \"PROJECT\"")
|
|
endif()
|
|
|
|
add_subdirectory(sub)
|