Hi 

I'm running Mac OS X 10.6.4 with XCode 3.2.4 and CMake version 2.8.2

I'm trying to set the GCC version to 4.0, so that I can support the 10.4u SDK 
version.  

I've read the posts related to the setting released in 2.8.1 rc3, e.g. putting 
this in CMakeLists.txt:
        set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")

My CMAKE command line is:
        cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_MACOSX_DEPLOYMENT_TARGET=10.4 
-DCMAKE_OSX_SYSROOT=/Developer/SDKs/MacOSX10.4u.sdk 
-DCMAKE_OSX_ARCHITECTURES=i386 -G Xcode /Users/john/src/TRUNK

The top level CMakeLists.txt looks like this:
        set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "4.0")
        PROJECT( FileWave )
        cmake_minimum_required(VERSION 2.6)

When I blow away my out of source build directory, and then run the cmake 
command, I get the following output & error:

-- 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 /Applications/CMake 
2.8-2.app/Contents/share/cmake-2.8/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:/Applications/CMake\ 2.8-2.app/Contents/bin/cmakexbuild
  -project CMAKE_TRY_COMPILE.xcodeproj build -target cmTryCompileExec
  -configuration Debug

  ** BUILD FAILED **

  

  

  === 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)

  

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:4 (PROJECT)

-------------------------------------------------------

If I use the --debug-trycompile option, then I can see that the 
CMAKE_TRY_COMPILE.xcodeproj has NOT set the GCC_VERSION to 4.0, its still 4.2

Is there a work around for this?

Thanks,

<<inline: pastedGraphic.tiff>>




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




_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to