mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-28 01:51:02 -06: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)
|