mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-22 14:23:10 -05:00
4568d046c4
This property allows scripts to determine whether they're in project mode, script mode, find-package mode, CTest, or CPack.
9 lines
243 B
CMake
9 lines
243 B
CMake
cmake_minimum_required(VERSION 3.12)
|
|
|
|
get_property(role GLOBAL PROPERTY CMAKE_ROLE)
|
|
if(NOT role STREQUAL "FIND_PACKAGE")
|
|
message(SEND_ERROR "CMAKE_ROLE property is \"${role}\", should be \"FIND_PACKAGE\"")
|
|
endif()
|
|
|
|
set(DummyPackage_FOUND 1)
|