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.
19 lines
741 B
19 lines
741 B
3 years ago
|
include(${CMAKE_CURRENT_LIST_DIR}/TestVariable.cmake)
|
||
|
|
||
|
test_variable(CMAKE_BINARY_DIR "" "${CMAKE_SOURCE_DIR}/build")
|
||
|
test_variable(PARENT_VARIABLE "STRING" "Parent variable")
|
||
|
test_variable(OVERRIDDEN_VARIABLE "STRING" "Overridden variable")
|
||
|
test_variable(CHILD_VARIABLE "STRING" "Child variable")
|
||
|
|
||
|
if(DEFINED DELETED_VARIABLE OR DEFINED CACHE{DELETED_VARIABLE})
|
||
|
message(SEND_ERROR "DELETED_VARIABLE should not be defined")
|
||
|
endif()
|
||
|
|
||
|
test_environment_variable(PARENT_ENV "Parent environment variable")
|
||
|
test_environment_variable(CHILD_ENV "Child environment variable")
|
||
|
test_environment_variable(OVERRIDDEN_ENV "Overridden environment variable")
|
||
|
|
||
|
if(DEFINED ENV{DELETED_ENV})
|
||
|
message(SEND_ERROR "DELETED_ENV should not be defined")
|
||
|
endif()
|