[CMake] Chasing up: XCode 3.2.4 and CMake 2.8.2, setting GCC version to 4.0

John Clayton johnc at filewave.com
Mon Jan 3 08:36:22 EST 2011


Hi All,

i'm still having problems getting the CMAKE_XCODE_ATTRIBUTE_GCC_VERSION flag to properly force the compiler version I want to use for my project. 

I'm using XCode 3.2.5, on a Mac 10.6.3 machine - trying to target a Max OS X Tiger 10.4u build.  I get compiler errors because the gcc-4.2 compiler is being used in the compiler-test stage of CMake. 

I thought CMAKE_XCODE_ATTRIBUTE_GCC_VERSION could be used to force the compiler setting to 4.0?

My top level CMakeLists.txt file has this as its first few lines - is this the correct way to use this option? 

	PROJECT( FileWave )
	cmake_minimum_required(VERSION 2.6)
	set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")

The error I get after running an XCode based generator is: 
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Checking whether C compiler has -isysroot
-- Checking whether C compiler has -isysroot - yes
-- Checking whether C compiler supports OSX deployment target flag
-- Checking whether C compiler supports OSX deployment target flag - yes
-- Check for working C compiler using: Xcode
-- Check for working C compiler using: Xcode -- broken
CMake Error at /Users/john/CMake/Modules/CMakeTestCCompiler.cmake:52 (MESSAGE):
  The C compiler "/usr/bin/gcc-4.0" is not able to compile a simple test
  program.

  It fails with the following output:

   Change Dir: /Users/john/src/TRUNK/BuildSystem/Xcode/CMakeFiles/CMakeTmp

  

  Run Build Command:/Users/john/CMake/bin/cmakexbuild -project
  CMAKE_TRY_COMPILE.xcodeproj build -target cmTryCompileExec -configuration
  Debug

  

  === BUILD NATIVE TARGET cmTryCompileExec OF PROJECT CMAKE_TRY_COMPILE WITH
  CONFIGURATION Debug ===

  Check dependencies

  GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file testCCompiler.c)

  GCC 4.2 is not compatible with the Mac OS X 10.4 SDK (file testCCompiler.c)

  ** BUILD FAILED **

  






John Clayton

---------------------------
FileWave (Europe) GmbH
St. Gallerstrasse 1
CH - 9500 Wil
 
Phone: +41 71 914 30 80
Fax: +41 71 914 30 81
Web: www.filewave.com
Skype: johncclayton




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110103/810086ef/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pastedGraphic.tiff
Type: image/tiff
Size: 17484 bytes
Desc: not available
URL: <http://www.cmake.org/pipermail/cmake/attachments/20110103/810086ef/attachment-0001.tiff>


More information about the CMake mailing list