[CMake] Xcode 2.4 and cmake, does it work?

Sean McBride sean at rogue-research.com
Wed Oct 11 12:29:49 EDT 2006


On 2006-10-10 17:08, William A. Hoffman said:

>There is a dashbaord, and it seems to be working.
>eno     Darwin-XCode24-dbg  
>So, I think it should work.   The output you have is not very helpful.
>You may want to try a cmake --debug-trycompile, then look at
>the CMakeFiles/CMakeTmp directory and see what is wrong with the project
>if you load it directly into the Xcode gui.

Thanks Bill,

So I opened the proj in Xcode.app and saw the following in the build
transcript:

<snip>
    /usr/bin/distcc /usr/bin/gcc-4.0 -x c -arch ppc -pipe -Wno-trigraphs
-fpascal-strings -fasm-blocks -g -O0 -DCMAKE_INTDIR=\"Debug\" -fmessage-
length=0 -mtune=G4 -Wmost -Wno-four-char-constants -Wno-unknown-pragmas -
O0 -mdynamic-no-pic -fpch-preprocess -F/Users/sean/kitware/CMake-Xcode/
CMakeFiles/CMakeTmp/Debug -I/Users/sean/kitware/CMake-Xcode/CMakeFiles/
CMakeTmp/Debug/include -I/Users/sean/kitware/CMake-Xcode/CMakeFiles/
CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/cmTryCompileExec.build/
DerivedSources warf-2 -Wall -Wextra -Wshorten-64-to-32 -g -c /Users/sean/
kitware/CMake-Xcode/CMakeFiles/CMakeTmp/testCCompiler.c -o /Users/sean/
kitware/CMake-Xcode/CMakeFiles/CMakeTmp/CMAKE_TRY_COMPILE.build/Debug/
cmTryCompileExec.build/Objects-normal/ppc/testCCompiler.o
powerpc-apple-darwin8-gcc-4.0.1: warf-2: No such file or directory

"warf-2"?!  Then I remembered:

SET (CTEST_ENVIRONMENT
"MACOSX_DEPLOYMENT_TARGET=10.4"
"CFLAGS=-gdwarf-2 -Wall -Wextra -Wshorten-64-to-32"
"CXXFLAGS=-gdwarf-2 -Wall -Wextra -Wshorten-64-to-32"
  )

So somehow or other that "-gdwarf-2" is getting clipped to "warf-2".  If
I move it after -Wshorten-64-to-32 it's still clipped.  If I remove it
entirely CMake builds.  If I use "Unix Makefiles" (with -gdwarf-2) it
also works.

Any ideas?

Thanks,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the CMake mailing list