On Thursday 12 October 2006 02:27, William A. Hoffman wrote: > At 07:19 PM 10/11/2006, Axel Roebel wrote: > >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. > > You need to set the environment variable CC=/path/gcc-osx-10.3 and CXX, > before you run cmake or ccmake. Also, with a clean directory.
That is exactly what I want to avoid. If I need to remember such preparations I will forget it from time to time, and I will forget it if it is most important - during a release compilation. That's why I prefer it to be completely automatic. I found the problem I had with setting SET(CMAKE_C_COMPILER path/gcc-osx-10.3) All subsequent TRY_COMPILE calls will ignore it - because the cmake calls used inside will only look at CMakeCCompiler.cmake to determine the compiler. So I'll stay with my automatic patch of CMakeCCompiler.cmake and co. Thanks for your comments. -- 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
