Now, why didn't

if ( $ENV{SOME_ENV_VAR} )

work?


Because $ENV{SOME_ENV_VAR} has the same behavior as ${SOME_ENV_VAR}, it evaluates a variable. The only difference is that ${} is a CMake variable and $ENV{} is an operating system environment variable.

I assume that IF statement only scan for CMake variables so you must do like you did: turn the environment variable into a CMake variable to make the conditional statement work.

--Sylvain
_______________________________________________
CMake mailing list
CMake@cmake.org
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to