From 0da556e1f8f2015b2c9d39bb2bf0bc5eafe0b95e Mon Sep 17 00:00:00 2001 From: Jan Beich Date: Fri, 21 Sep 2018 21:54:16 +0000 Subject: [PATCH] build/cmake: properly disable assert() globally for release builds Assertion failed: (ObjectBufferMap.find(Key) == ObjectBufferMap.end() && "Second attempt to perform debug registration."), function NotifyObjectEmitted, file llvm/lib/ExecutionEngine/GDBRegistrationListener.cpp, line 168. --- CMakeLists.txt | 4 ++++ rpcs3/CMakeLists.txt | 4 ---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebfcee2771..e7ba8602ac 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -30,6 +30,10 @@ if (NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE "Release") endif() +if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") + add_definitions(-DNDEBUG) +endif() + if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8) message( FATAL_ERROR "RPCS3 can only be compiled on 64-bit platforms." ) endif() diff --git a/rpcs3/CMakeLists.txt b/rpcs3/CMakeLists.txt index 55f7842d92..78c3e805cd 100644 --- a/rpcs3/CMakeLists.txt +++ b/rpcs3/CMakeLists.txt @@ -10,10 +10,6 @@ add_custom_target(GitVersion ALL # Check for a sufficient compiler and set build options include(ConfigureCompiler) -if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-DNDEBUG) -endif() - set(ADDITIONAL_LIBS "") if(CMAKE_SYSTEM MATCHES "Linux") #on some Linux distros shm_unlink and similar functions are in librt only