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.

16 lines
686 B

if (NOT DEFINED ENV{TEST_ENV_EXPECTED})
if (NOT DEFINED ENV{TEST_ENV})
message(STATUS "TEST_ENV is correctly not set in environment")
else ()
message(FATAL_ERROR "TEST_ENV is incorrectly set in environment")
endif ()
else ()
if (NOT DEFINED ENV{TEST_ENV})
message(FATAL_ERROR "TEST_ENV is incorrectly not set in environment")
elseif ("$ENV{TEST_ENV}" STREQUAL "$ENV{TEST_ENV_EXPECTED}")
message(STATUS "TEST_ENV is correctly set in environment: $ENV{TEST_ENV}")
else ()
message(FATAL_ERROR "TEST_ENV is incorrectly set in environment!\n\tactual: $ENV{TEST_ENV}\n\texpected: $ENV{TEST_ENV_EXPECTED}")
endif ()
endif ()