How do I set an environment variable so that it is visible globally in
CMake? Specifically, I want to have it visible when I run something
like:
#-----------------------------------
# set the environment variable value
set( ENV{myVariable} ... )
# run a test through a CMake script that requires the environment
variable set above.
add_test( myTest
${CMAKE_COMMAND}
-D exe_name:STRING=myExecutable
-P ${PROJECT_SOURCE_DIR}/test_problems/run_test.cmake
)
#-----------------------------------
In the "run_test.cmake" file I would like to have "myVariable"
available as an environment variable, but it is not, despite the fact
that it was set prior to the execution of "run_test.cmake".
What am I missing here?
James
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake