[Cmake-commits] [cmake-commits] king committed CMakeCCompiler.cmake.in 1.21 1.22 CMakeCXXCompiler.cmake.in 1.21 1.22

cmake-commits at cmake.org cmake-commits at cmake.org
Sat Sep 19 10:14:32 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv14967/Modules

Modified Files:
	CMakeCCompiler.cmake.in CMakeCXXCompiler.cmake.in 
Log Message:
Fix check for -isysroot on OS X

Previously we checked for this flag by parsing the version number of GCC
out of 'gcc --version', but this is not reliable because the format can
vary greatly.  Now we run 'gcc -v --help' and look for '-isysroot' in
the list of options.

We also now store the result on a per-language basis in the per-compiler
info file "CMake<LANG>Compiler.cmake".  This is necessary to make it
accessible from try-compile projects so that they generate correctly.


Index: CMakeCXXCompiler.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXCompiler.cmake.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** CMakeCXXCompiler.cmake.in	30 Jul 2009 14:59:37 -0000	1.21
--- CMakeCXXCompiler.cmake.in	19 Sep 2009 14:14:29 -0000	1.22
***************
*** 37,40 ****
--- 37,42 ----
  ENDIF(CMAKE_CXX_COMPILER_ABI)
  
+ SET(CMAKE_CXX_HAS_ISYSROOT "@CMAKE_CXX_HAS_ISYSROOT@")
+ 
  SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "@CMAKE_CXX_IMPLICIT_LINK_LIBRARIES@")
  SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "@CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES@")

Index: CMakeCCompiler.cmake.in
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCCompiler.cmake.in,v
retrieving revision 1.21
retrieving revision 1.22
diff -C 2 -d -r1.21 -r1.22
*** CMakeCCompiler.cmake.in	23 Jul 2009 14:07:17 -0000	1.21
--- CMakeCCompiler.cmake.in	19 Sep 2009 14:14:29 -0000	1.22
***************
*** 36,39 ****
--- 36,41 ----
  ENDIF(CMAKE_C_COMPILER_ABI)
  
+ SET(CMAKE_C_HAS_ISYSROOT "@CMAKE_C_HAS_ISYSROOT@")
+ 
  SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "@CMAKE_C_IMPLICIT_LINK_LIBRARIES@")
  SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "@CMAKE_C_IMPLICIT_LINK_DIRECTORIES@")



More information about the Cmake-commits mailing list