[CMake] $ENV{env_var} is not picking up user defined environment variables

Avanindra Singh avanindra.singh at gmail.com
Wed Dec 28 17:48:46 EST 2011


Hi,

I am trying to access environment variables in CMakeLists.txt in UNIX
environment. Here is example code

message(STATUS "cuda path $ENV{CUDA_PATHS}" )

and it is not printing anything for the variable. While when i try to echo
it on terminal , i get proper value.


avanindra at avanindra-Triayaam:~/projects/ros_3d/build$ echo ${CUDA_PATH}
/usr/local/cuda


Can some one please help me fix this.

Thanks
Avanindra Singh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20111229/df5416d0/attachment.htm>


More information about the CMake mailing list