mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-06 05:40:54 -06:00
This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
8 lines
234 B
CMake
8 lines
234 B
CMake
cmake_minimum_required(VERSION 3.12)
|
|
set(CTEST_RUN_CURRENT_SCRIPT 0)
|
|
|
|
get_property(role GLOBAL PROPERTY CMAKE_ROLE)
|
|
if(NOT role STREQUAL "CTEST")
|
|
message(SEND_ERROR "CMAKE_ROLE property is \"${role}\", should be \"CTEST\"")
|
|
endif()
|