[CMake] How to set compiler flags?

Michael Wild themiwi at gmail.com
Fri Oct 1 06:52:34 EDT 2010


On 1. Oct, 2010, at 12:45 , David Aldrich wrote:

> Hi Michael
> 
>> Wrong. CMAKE_CXX_FLAGS is always used, the configuration-specific values are
>> appended to it.
> 
> This is where I groan a little. I haven't read that in the online documentation.
> 
> Best regards 
> 
> David


Couldn't find it in the docs either (just had a superficial look), but in the CMakeCache.txt it says cleary:

//Flags used by the compiler during all build types.
CMAKE_CXX_FLAGS:STRING=

//Flags used by the compiler during debug builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=-g

...


Michael

--
There is always a well-known solution to every human problem -- neat, plausible, and wrong.
H. L. Mencken

-------------- next part --------------
A non-text attachment was scrubbed...
Name: PGP.sig
Type: application/pgp-signature
Size: 195 bytes
Desc: This is a digitally signed message part
URL: <http://www.cmake.org/pipermail/cmake/attachments/20101001/b423fea8/attachment.pgp>


More information about the CMake mailing list