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
663 B

cmake_minimum_required(VERSION 3.18)
project(environment NONE)
if(NOT "$ENV{KEPT_VARIABLE}" STREQUAL "Kept variable")
message(SEND_ERROR "KEPT_VARIABLE is \"$ENV{KEPT_VARIABLE}\", should be \"Kept variable\"")
endif()
if(NOT "$ENV{ADDED_VARIABLE}" STREQUAL "Added variable")
message(SEND_ERROR "ADDED_VARIABLE is \"$ENV{ADDED_VARIABLE}\", should be \"Added variable\"")
endif()
if(NOT "$ENV{CHANGED_VARIABLE}" STREQUAL "Changed variable")
message(SEND_ERROR "CHANGED_VARIABLE is \"$ENV{CHANGED_VARIABLE}\", should be \"Changed variable\"")
endif()
if(DEFINED ENV{REMOVED_VARIABLE})
message(SEND_ERROR "REMOVED_VARIABLE should not be defined")
endif()