yade-dev team mailing list archive
-
yade-dev team
-
Mailing list archive
-
Message #10186
[Branch ~yade-pkg/yade/git-trunk] Rev 3736: Use ADD_DEFINITIONS instead of adding those directly in CXX_FLAGS.
------------------------------------------------------------
revno: 3736
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2013-10-30 08:54:30 +0100
message:
Use ADD_DEFINITIONS instead of adding those directly in CXX_FLAGS.
modified:
CMakeLists.txt
--
lp:yade
https://code.launchpad.net/~yade-pkg/yade/git-trunk
Your team Yade developers is subscribed to branch lp:yade.
To unsubscribe from this branch go to https://code.launchpad.net/~yade-pkg/yade/git-trunk/+edit-subscription
=== modified file 'CMakeLists.txt'
--- CMakeLists.txt 2013-10-30 07:54:30 +0000
+++ CMakeLists.txt 2013-10-30 07:54:30 +0000
@@ -52,25 +52,27 @@
ENDIF()
#===========================================================
+ADD_DEFINITIONS(" -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast ")
IF (CMAKE_CXX_FLAGS)
#If flags are set, add only neccessary flags
IF (DEBUG)
SET(CMAKE_VERBOSE_MAKEFILE 1)
SET(CMAKE_BUILD_TYPE Debug)
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast -DYADE_DEBUG")
+ ADD_DEFINITIONS("-DYADE_DEBUG")
ELSE (DEBUG)
SET(CMAKE_BUILD_TYPE Release)
- SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast -fPIC")
+ SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
ENDIF (DEBUG)
ELSE (CMAKE_CXX_FLAGS)
#If flags are not set, add all useful flags
IF (DEBUG)
SET(CMAKE_VERBOSE_MAKEFILE 1)
SET(CMAKE_BUILD_TYPE Debug)
- SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast -DYADE_DEBUG -Wall -fPIC -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security")
+ ADD_DEFINITIONS("-DYADE_DEBUG")
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Wall -fPIC -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security")
ELSE (DEBUG)
SET(CMAKE_BUILD_TYPE Release)
- SET(CMAKE_CXX_FLAGS "-DYADE_PTR_CAST=static_pointer_cast -DYADE_CAST=static_cast -Wall -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -s")
+ SET(CMAKE_CXX_FLAGS "-Wall -fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wformat-security -Werror=format-security -s")
ENDIF (DEBUG)
ENDIF (CMAKE_CXX_FLAGS)
#===========================================================