[CMake] Problem with Xcode
Carminati Federico
Federico.Carminati at cern.ch
Wed Jul 16 15:04:52 EDT 2008
Hello Mike,
I have no idea, I could try. However if cmake does support fortran
and does support xcode, and if you cannot make a xcode project out of
a cmake set of files that otherwise support a unix makefile, there is
a contraddiction somewhere.... As a matter of fact, if I only include
fortran files the Unix makefile work, but not the xcode project. Can
anyone shed some light on this?
Federico Carminati
CERN-PH
1211 Geneva 23
Switzerland
Tel: +41 22 76 74959
Fax: +41 22 76 79480
Mobile: +41 76 487 4843
On 16 Jul 2008, at 19:12, Mike Jackson wrote:
> Does Xcode even know how to handle Fortran? Ie, Can you make an
> Xcode project by hand that incudes Fortran files and have it compile
> the code to a program?
>
> --
> Mike Jackson Senior Research Engineer
> Innovative Management & Technology Services
>
>
> On Jul 16, 2008, at 1:08 PM, Carminati Federico wrote:
>
>> 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
>>
>> _______________________________________________
>> CMake mailing list
>> CMake at cmake.org
>> http://www.cmake.org/mailman/listinfo/cmake
>>
>
>
More information about the CMake
mailing list