CMake -Dassert=true properly enables asserts in Release:

* CMake defaults CMAKE_CXX_FLAGS_RELEASE, etc. to include defining
  NDEBUG, regardless of other options set elsewhere, for most or all
  generators. This change explicitly removes that flag from the relevant
  variables.
* Also move the project command earlier, since it wipes out some local
  changes.
This commit is contained in:
Edward Hennis
2017-01-27 11:38:48 -05:00
committed by Nik Bougalis
parent 7ca03d3bca
commit 232ec62c75
2 changed files with 13 additions and 7 deletions

View File

@@ -54,6 +54,10 @@
cmake_minimum_required(VERSION 3.1.0)
# The project command can override some computed values.
# Don't put any code above this line.
project(rippled)
if("${CMAKE_SOURCE_DIR}" STREQUAL "${CMAKE_BINARY_DIR}")
set(dir "build")
set(cmd "cmake")
@@ -96,8 +100,6 @@ endif()
setup_build_cache()
project(rippled)
if(nonunity)
get_cmake_property(allvars VARIABLES)
string(REGEX MATCHALL "[^;]*(DEBUG|RELEASE)[^;]*" matchvars "${allvars}")