[CMake] Problem with flags under Windows/

Alexander Camek camek at fortiss.org
Tue Feb 23 04:19:08 EST 2010


Hi all,

Currently I am using a CompilerFlags.cmake file for setting all my flags, done with:

set(CMAKE_USER_MAKE_RULES_OVERRIDE ${CMAKE_CURRENT_SOURCE_DIR}/cmake/CompilerFlags.cmake CACHE
STRING "Override makefile generation rules.")

In this CompilerFlags.cmake all targets (DEBUG, RELEASE,...) are set. After invoking my script on
the commandline of Windows7 with:
cmake -DCMAKE_BUILD_TYPE=DEBUG -Dbuild_hmi=on -G "MinGW Makefiles" ..\..\work\trunk

I would expect that all flags are correctly setted. But when I take a look at the corresponding
files the flags are strange setted.

My c flags are setted twice (flags.make).
C_FLAGS = -g -ggdb -ansi -std=c99 -DDEBUG -W -Wextra -Wall -Wbad-function-cast -Wcomments
-Wunused-macros -Wendif-labels -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
-Wold-style-definition -Wstrict-prototypes -Wdeclaration-after-statement -fprofile-arcs
-ftest-coverage -fmessage-length=0 -g -ggdb -ansi -std=c99 -DDEBUG -W -Wextra -Wall
-Wbad-function-cast -Wcomments -Wunused-macros -Wendif-labels -Wmissing-declarations
-Wmissing-prototypes -Wnested-externs -Wold-style-definition -Wstrict-prototypes
-Wdeclaration-after-statement -fprofile-arcs -ftest-coverage -fmessage-length=0

On the other side my c++ flags are not set (flags.make).
CXX_FLAGS = -g

My system is Windows7 and I am using CMake 2.8.0.

Thanks for your help.

Greetings

Alexander
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: CompilerFlags.cmake
URL: <http://www.cmake.org/pipermail/cmake/attachments/20100223/4d6ba6bd/attachment.txt>


More information about the CMake mailing list