[Cmake-commits] [cmake-commits] hoffman committed Darwin.cmake 1.59 1.60
cmake-commits at cmake.org
cmake-commits at cmake.org
Fri Sep 18 14:22:22 EDT 2009
Update of /cvsroot/CMake/CMake/Modules/Platform
In directory public:/mounts/ram/cvs-serv21917/Modules/Platform
Modified Files:
Darwin.cmake
Log Message:
Add detection of gcc versions that do not support isysroot option and do not use it for them.
Index: Darwin.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/Platform/Darwin.cmake,v
retrieving revision 1.59
retrieving revision 1.60
diff -C 2 -d -r1.59 -r1.60
*** Darwin.cmake 17 Sep 2009 15:52:59 -0000 1.59
--- Darwin.cmake 18 Sep 2009 18:22:20 -0000 1.60
***************
*** 183,186 ****
--- 183,200 ----
ENDIF(XCODE)
+ IF(NOT CMAKE_OSX_GCC_SUPPORT_ISYSROOT)
+ IF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ EXECUTE_PROCESS(COMMAND ${CMAKE_C_COMPILER} "--version"
+ OUTPUT_VARIABLE GCC_VERSION)
+ ENDIF("${CMAKE_C_COMPILER_ID}" MATCHES "GNU")
+ STRING(REGEX REPLACE "^[^ ]+[ ][^ ]+[ ]([^ ]+).*$" "\\1"
+ gcc_version_tmp "${GCC_VERSION}")
+ IF(${gcc_version_tmp} VERSION_GREATER 3.9)
+ SET(CMAKE_OSX_GCC_SUPPORT_ISYSROOT TRUE CACHE INTERNAL "GCC supports isysroot")
+ ELSE(${gcc_version_tmp} VERSION_GREATER 3.9)
+ SET(CMAKE_OSX_GCC_SUPPORT_ISYSROOT FALSE CACHE INTERNAL "GCC supports isysroot")
+ ENDIF(${gcc_version_tmp} VERSION_GREATER 3.9)
+ ENDIF(NOT CMAKE_OSX_GCC_SUPPORT_ISYSROOT)
+
# Need to list dependent shared libraries on link line. When building
# with -isysroot (for universal binaries), the linker always looks for
More information about the Cmake-commits
mailing list