← Back to team overview

yade-dev team mailing list archive

[Branch ~yade-pkg/yade/git-trunk] Rev 3738: Add -DNDEBUG if compiling in release mode

 

------------------------------------------------------------
revno: 3738
committer: Anton Gladky <gladky.anton@xxxxxxxxx>
timestamp: Wed 2015-11-11 07:51:22 +0100
message:
  Add -DNDEBUG if compiling in release mode
  
  Drops asserts in non-debug mode.
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	2015-11-09 20:26:06 +0000
+++ CMakeLists.txt	2015-11-11 06:51:22 +0000
@@ -77,6 +77,8 @@
   SET(CMAKE_VERBOSE_MAKEFILE 1)
   SET(CMAKE_BUILD_TYPE Debug)
   ADD_DEFINITIONS("-DYADE_DEBUG -g")
+ELSE (DEBUG)
+  ADD_DEFINITIONS(${CMAKE_CXX_FLAGS_RELEASE})
 ENDIF (DEBUG)
 
 #===========================================================