Thiago Macieira wrote: > Brad King wrote: > >>When a build tree is first created by CMake it becomes locked to the >>compiler specified the first time. If the compiler is not specified >>with a full path then the PATH is searched to find it, and then that >>full path is used. It is not safe to build some of a tree with one >>compiler and then the rest with another in C++ anyway. Even if the >>compilers share an ABI the try-compile results may be different. > > > The point is I *want* to switch compilers. > > I want to switch between gcc, colorgcc and teambuilder/icecream/etc. > > And I do that by setting PATH. Currently, the only want to switch > compilers is to rm -rf * and reconfigure. > > This is how I work: > $ teambuilder off > $ cmake /path/to/src/kdelibs > $ teambuilder on > $ make -kj25 > <wait for parallel build to complete> > $ make > <inspect one single compilation error> > > I don't want to run all the configure tests with Teambuilder because they > are all mostly small and the overhead of sending to another machine, > compiling and sending back isn't worth it. But I do want to make the > gross (-k) compilation with Teambuilder to get most everything out of the > way. > > Currently, I have no choice but to run all the configure tests with the > compile farm.
Just create a shell script that runs the compiler via the path and use that as the CMake compiler: CC=mycc.sh CXX=mycxx.sh cmake ... In mycc.sh write: ------------------ #!/bin/sh exec gcc "$@" ------------------ In mycxx.sh write: ------------------ #!/bin/sh exec g++ "$@" ------------------ -Brad _______________________________________________ Kde-buildsystem mailing list Kde-buildsystem@kde.org https://mail.kde.org/mailman/listinfo/kde-buildsystem