[CMake] another problem with ENV vars and windows paths

William A. Hoffman billlist at nycap.rr.com
Wed Mar 22 09:43:54 EST 2006


At 02:48 PM 3/21/2006, Alexander Neundorf wrote:
>Hi, 
> 
>recently cmake cvs has the new FILE() command: 
> 
>FILE(SYSTEM_PATH ENVIRONMENT_VARIABLE _variable) 
> 


How about this:

FILE(SYSTEM_PATH ENV{PATH} RESULTVAR)
FILE(SYSTEM_PATH CMAKE_VAR RESULTVAR)

The variable would be treated as a cmake variable if it did not
have ENV{} around it.  That way you could use this for both the
output of a command, or to get an environment variable.



-Bill



More information about the CMake mailing list