On Wednesday 11 October 2006 15:28, you wrote: > Axel Roebel wrote: > > The problem is that to my knowledge the only way to communicate the > > deployment target to gcc is via environment variables. I admit this is a > > really strange way (probably its save to say silly) to select compiler > > options, but as far as I know, this is the way it is done in Xcode. And > > it is the way it is suggested by apple for makefiles > > > > see (at the very bottom ) > > http://developer.apple.com/documentation/DeveloperTools/Conceptual/cross_ > >development/Using/chapter_3_section_2.html#//apple_ref/doc/uid/20002000-11 > >14311-BABGCAAB > > > > This means in the makefile the compiler needs to be called > > as in > > > > target : > > MACOSX_DEPLOYMENT_TARGET=10.3 gcc ... > > > > so the question would be how to achieve this. > > I've the strong feeling it is not possible - is it? > > Try creating a shell script called "gcc-osx-10.3" containing something like
This is exactly what I do currently. I thought there would may be exist an easier way. I now see that my main problem is how I replace the compiler: I patch CMakeFiles/CMakeCCompiler.cmake from within CMakeLists.txt, while I probably should simply do SET(CMAKE_C_COMPILER path/gcc-osx-10.3) I think when I tried that with an older cmake like 2.2... this SET would not override the compiler. With 2.4.3 I still find the original compiler /usr/bin/gcc in the CMakeCache.txt but at least the build.cmake has the script. Thanks > #!/bin/sh > export MACOSX_DEPLOYMENT_TARGET=10.3 > exec gcc "$@" > > and then set that as your compiler. > > -Brad -- Axel Roebel IRCAM Analysis/Synthesis Team Phone: ++33-1-4478 4845 | Fax: ++33-1-4478 1540 _______________________________________________ CMake mailing list [email protected] http://www.cmake.org/mailman/listinfo/cmake
