[CMake] Problem with Xcode
Carminati Federico
Federico.Carminati at cern.ch
Wed Jul 16 13:08:33 EDT 2008
Good evening,
the following simple CMakeLists.txt works when generating Unix
makefiles and fails when generating Xcode projects
Project(Test)
Cmake_Minimum_Required(VERSION 2.6)
Set(CMAKE_Fortran_COMPILER gfortran)
Enable_Language(Fortran)
Set(CMAKE_Fortran_FLAGS "-fno-second-underscore")
Add_Executable(hello hello.c hello.F)
What happens is that in the Xcode project the -fno-second-underscore
option is passed to the c compiler and compilation fails
CompileC Test.build/Debug/hello.build/Objects-normal/i386/
hello-8AACF6EC.o /Users/fca/cmaketest/hello.c normal i386 c
com.apple.compilers.gcc.4_0
cd /Users/fca/cmaketest
/Developer/usr/bin/gcc-4.0 -x c -arch i386 -pipe -Wno-trigraphs -
fpascal-strings -fasm-blocks -O0 -mdynamic-no-pic -
DCMAKE_INTDIR="Debug" -fmessage-length=0 -Wmost -Wno-four-char-
constants -Wno-unknown-pragmas -O0 -F/Users/fca/cmaketest/Debug -I/
Users/fca/cmaketest/Debug/include -I/Users/fca/cmaketest/Test.build/
Debug/hello.build/DerivedSources -fno-second-underscore -c /Users/fca/
cmaketest/hello.c -o /Users/fca/cmaketest/Test.build/Debug/hello.build/
Objects-normal/i386/hello-8AACF6EC.o
cc1: error: unrecognized command line option "-fno-second-underscore"
Best regards,
Federico Carminati
CERN-PH
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 79480
Mobile: +41 76 487 4843
More information about the CMake
mailing list