[CMake] How to dictate cmake best CFLAGS/...

Christoph Cullmann cullmann at absint.com
Sat Apr 26 06:44:27 EDT 2008


Am Freitag 25 April 2008 19:17:47 schrieb Alexander Neundorf:
> Setting the CC, CXX, CFLAGS and CXXFLAGS environment variables when cmake
> is run initially should work.
> Is this good enough ?
Sounds Ok, if that works on Windows as well :) I guess made error as I tried 
that last time and it seemed not to work, that was the reason I tried it with 
the CMAKE_C_FLAGS stuff which worked out of the box. Does LDFLAGS be honored, 
too, if set on Windows, on Linux it seems? And what's up with CPPFLAGS, 
should I mix them into the CFLAGS/CXXFLAGS or are they honored in addition on 
Linux/Windows, seems not be the case for C++?

Other question: Are any flags added to the given default via environment? Our 
current Buildsystem dictates debug/release/profiling/... buildtypes by just 
setting the env vars to the appropriate values, will this work out of the box 
by running cmake + (make|nmake) while this vars are set or will cmake still 
add it's ideas of debug/release flags?

Btw., thanks already for the help, makes my life easier for linux, seems I 
just made stupid error that I thought the flags would be ignored there :)

cu
Christoph

-- 
-------------------------------------- Christoph Cullmann ---------
AbsInt Angewandte Informatik GmbH      Email: cullmann at AbsInt.com
Science Park 1                         Tel:   +49-681-38360-22
66123 Saarbrücken                      Fax:   +49-681-38360-20
GERMANY                                WWW:   http://www.AbsInt.com
--------------------------------------------------------------------
Geschäftsführung: Dr.-Ing. Christian Ferdinand
Eingetragen im Handelsregister des Amtsgerichts Saarbrücken, HRB 11234


More information about the CMake mailing list