[CMake] A way to set default compiler, etc.?
Alexander Neundorf
a.neundorf-work at gmx.net
Thu Sep 20 11:57:46 EDT 2012
On Thursday 20 September 2012, Rui Maciel wrote:
> On 09/20/2012 02:10 PM, Dave Abrahams wrote:
> > When I invoke cmake for the first time in a project, I normally use
> >
> > -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
> >
> > I'm tired of typing that every time I blow away my CMakeCache.txt. Is
> > there a place I can register these preferences so I don't have to?
>
> Have you tried adding CMAKE_FORCE_C_COMPILER() AND
> CMAKE_FORCE_CXX_COMPILER() macros to your CMakeLists.txt ?
>
> http://www.cmake.org/cmake/help/v2.8.8/cmake.html#module:CMakeForceCompiler
Don't do that, this is only for very rare cases if you really know what you
are doing.
Alex
More information about the CMake
mailing list