You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

11 lines
286 B

get_property(role GLOBAL PROPERTY CMAKE_ROLE)
file(WRITE "${CMAKE_BINARY_DIR}/test.cmake" "# a")
include("${CMAKE_BINARY_DIR}/test.cmake")
if(NOT role STREQUAL "PROJECT")
message(SEND_ERROR "CMAKE_ROLE property is \"${role}\", should be \"PROJECT\"")
endif()
add_subdirectory(sub)