[CMake] A way to set default compiler, etc.?
Rolf Eike Beer
eike at sf-mail.de
Thu Sep 20 12:41:02 EDT 2012
Alexander Neundorf wrote:
> On Thursday 20 September 2012, Rolf Eike Beer wrote:
> > Am 2012-09-20 15:10, schrieb Dave Abrahams:
> > > 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?
> >
> > Don't fiddle with that variables. Ever. CMake will set them during
> > toolchain discovery and messing around with them may cause every type of
> > havoc if you are unlucky.
>
> doing this on the initial cmake run is fine, it is equivalent to setting the
> CC/CXX environment variables. This is also what is doing when
> crosscompiling, those two variables have to be preset.
Sure, but don't tell them ;) It should only be done from within a toolchain
file.
Eike
--
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120920/b6fb7920/attachment.pgp>
More information about the CMake
mailing list