[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.25 1.26

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 17 08:24:38 EST 2008


Update of /cvsroot/CMake/CMake/Tests/StringFileTest
In directory public:/mounts/ram/cvs-serv13476/Tests/StringFileTest

Modified Files:
	CMakeLists.txt 
Log Message:
ENH: Allow most characters in ENV variable refs

The $ENV{VAR} syntax permits access to environment variables.  This
teaches CMake to recognize most characters in the VAR name since some
environments may have variables with non-C-identifier characters.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/StringFileTest/CMakeLists.txt,v
retrieving revision 1.25
retrieving revision 1.26
diff -C 2 -d -r1.25 -r1.26
*** CMakeLists.txt	25 Mar 2008 15:27:06 -0000	1.25
--- CMakeLists.txt	17 Dec 2008 13:24:35 -0000	1.26
***************
*** 133,136 ****
--- 133,143 ----
  ENDIF(NOT result)
  
+ # Obscure environment variable name
+ SET("ENV{x+(y)}" "Obscure environment variable value")
+ MESSAGE("Output: [$ENV{x+(y)}]")
+ IF(NOT "$ENV{x+(y)}" STREQUAL "Obscure environment variable value")
+   MESSAGE(SEND_ERROR "Environment variable \"ENV{x+(y)}\" does not work.")
+ ENDIF()
+ 
  # Make directories test
  FILE(MAKE_DIRECTORY 



More information about the Cmake-commits mailing list