[Cmake] build flags

Sebastien BARRE sebastien at barre.nom.fr
Wed May 23 18:26:25 EDT 2001


At 23/05/2001 17:18, Bill Hoffman wrote:
>I just checked in this change:

Thanks Bill :)

>CMAKE_CXX_FLAGS_RELEASE = /MD /O2
>CMAKE_CXX_FLAGS_MINSIZEREL = /MD /O1
>CMAKE_CXX_FLAGS_DEBUG = /MDd /Zi /Od /GZ

Ooops, no, you checked in :

CMAKE_CXX_FLAGS_DEBUG = /MDd /Zi /Od /Gz /O2

a) /O2 will take precedence over /Od.
b) /Gz is not /GZ :)

I fixed that.

>CMAKE_CXX_FLAGS = /W3 /Zm1000 /FD /GX /GR

Well indeed you checked in :

CMAKE_CXX_FLAGS=/W3 /Zm1000 /GX /GR

/FD is not there.

>.... Release build .....
># ADD BASE CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D 
>"_USRDLL" /D "OUTPUT_LIBNAME_EXPORTS" /FD /c
># ADD CPP /nologo /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D 
>"_USRDLL"  /FD /c
># ADD CPP BUILD_INCLUDES EXTRA_DEFINES /D "OUTPUT_LIBNAME_EXPORTS"
># ADD CPP CMAKE_CXX_FLAGS_RELEASE
># ADD CPP CMAKE_CXX_FLAGS

If you do not mind, I'd like to invert the order (as explained privately 
today) to :

># ADD CPP CMAKE_CXX_FLAGS
># ADD CPP CMAKE_CXX_FLAGS_RELEASE

because this is more likely that "Release" specific options will probably 
take over the "common" flags. Is it OK for you ?

As you have overwritten/cancelled some of my changes two times today :), 
I'd like to clarify them :
DLLHeader.dsptemplate :
         # PROP Output_Dir "LIBRARY_OUTPUT_PATHMinSizeRel"
         # PROP Intermediate_Dir "LIBRARY_OUTPUT_PATHMinSizeRel"
this is wrong and should be :
         # PROP Output_Dir "LIBRARY_OUTPUT_PATHMinSizeRel"
         # PROP Intermediate_Dir "MinSizeRel"
as all other templates and targets (the intermediate dir is used for .obj 
files, but I don't think someone specifying LIBRARY_OUTPUT_PATH is 
expecting to find several hundreds of .obj files here, but only the final 
libraries :))





More information about the CMake mailing list