From efea1d0bf87b811c7c76612322e8150139512b77 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 7 Mar 2017 21:47:15 +0000 Subject: [PATCH] Add support for RelWithDebInfo builds using CMake Debugging release tests is pretty difficult without debug info. This release-compatible build makes it easier. --- infrastructure/cmake/CMakeLists.txt | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/infrastructure/cmake/CMakeLists.txt b/infrastructure/cmake/CMakeLists.txt index ce2051317..4eb7f1947 100644 --- a/infrastructure/cmake/CMakeLists.txt +++ b/infrastructure/cmake/CMakeLists.txt @@ -233,7 +233,7 @@ foreach(module_dep ${module_deps}) # For "make install" and CPack generators: install(TARGETS ${module_name} RUNTIME - CONFIGURATIONS Debug;Release + CONFIGURATIONS Debug;Release;RelWithDebInfo DESTINATION "." COMPONENT Applications) elseif(module_name MATCHES "^test_") @@ -333,7 +333,10 @@ endforeach() # We can't do anything conditional on CMAKE_BUILD_TYPE because that's not valid for multi-configuration # generators such as MSVC. We need to use a generator expression instead. -target_compile_definitions(lib_common PUBLIC $<$:BOX_RELEASE_BUILD>) +target_compile_definitions(lib_common PUBLIC + $<$:BOX_RELEASE_BUILD> + $<$:BOX_RELEASE_BUILD> +) # Detect platform features and write BoxConfig.h.in. Reuse code from # infrastructure/m4/boxbackup_tests.m4 where possible