CMake/Tests/RunCMake/CommandLine/E_env-unset.cmake
Brad King 7abd574798 cmake: Add '-E env' command-line tool
Extend the cmake command-line interface to support

 cmake -E env [--unset=NAME]... [NAME=VALUE]... COMMAND [ARG]...

This will be useful to run processes with modified environments
without using a shell or a full "cmake -P" script to wrap it.

Extend the RunCMake.CommandLine test to cover success and failure cases.

Inspired-by: Jonathan Bohren <jbo@jhu.edu>
2014-06-23 16:47:49 -04:00

6 lines
174 B
CMake

if(DEFINED ENV{TEST_ENV})
message(FATAL_ERROR "TEST_ENV is incorrectly set in environment")
else()
message(STATUS "TEST_ENV is correctly not set in environment")
endif()