From c2888302fdbaea588bd5797cc6c68e53408ed99c Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Thu, 6 Feb 2020 23:31:28 -0600 Subject: [PATCH] Fix debug/release mismatch Visual Studio doesn't like mixing debug and non-debug code. --- CMakeLists.txt | 2 +- cmake-proxies/CMakeLists.txt | 6 ------ cmake-proxies/wxwidgets/CMakeLists.txt | 2 +- 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index cbdeddf99..0d0415396 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,8 +56,8 @@ set( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake-proxies/cmake-modules) # This "is a good thing" but greatly increases link time on Linux #set( CMAKE_INTERPROCEDURAL_OPTIMIZATION ON ) +#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE ON ) #set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_DEBUG OFF ) -#set( CMAKE_INTERPROCEDURAL_OPTIMIZATION_Debug OFF ) # Set the required C++ stardard set( CMAKE_CXX_STANDARD 14 ) diff --git a/cmake-proxies/CMakeLists.txt b/cmake-proxies/CMakeLists.txt index 410111cea..e79e4ef33 100644 --- a/cmake-proxies/CMakeLists.txt +++ b/cmake-proxies/CMakeLists.txt @@ -119,12 +119,6 @@ function( addlib dir name symbol required check ) #packages ) # Set the folder (for the IDEs) for each one foreach( target ${targets} ) - # Add "global" defines - set( DEFINES - NDEBUG - ) - target_compile_definitions( ${TARGET} PRIVATE ${DEFINES} ) - # Skip interface libraries since they don't have any source to # present in the IDEs get_target_property( type "${target}" TYPE ) diff --git a/cmake-proxies/wxwidgets/CMakeLists.txt b/cmake-proxies/wxwidgets/CMakeLists.txt index 73f43782a..8cd37db8a 100644 --- a/cmake-proxies/wxwidgets/CMakeLists.txt +++ b/cmake-proxies/wxwidgets/CMakeLists.txt @@ -28,7 +28,7 @@ if( wxWidgets_FOUND ) set( DEFINES INTERFACE ${wxWidgets_DEFINITIONS} - ${wxWidgets_DEFINITIONS_DEBUG} + $<$:${wxWidgets_DEFINITIONS_DEBUG}> ) set( LINKDIRS