Skip to content

Commit

Permalink
Add support for RelWithDebInfo builds using CMake
Browse files Browse the repository at this point in the history
Debugging release tests is pretty difficult without debug info. This
release-compatible build makes it easier.
  • Loading branch information
qris committed Jul 23, 2017
1 parent 28c48b6 commit efea1d0
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions infrastructure/cmake/CMakeLists.txt
Expand Up @@ -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_")
Expand Down Expand Up @@ -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 $<$<CONFIG:Release>:BOX_RELEASE_BUILD>)
target_compile_definitions(lib_common PUBLIC
$<$<CONFIG:Release>:BOX_RELEASE_BUILD>
$<$<CONFIG:RelWithDebInfo>:BOX_RELEASE_BUILD>
)

# Detect platform features and write BoxConfig.h.in. Reuse code from
# infrastructure/m4/boxbackup_tests.m4 where possible
Expand Down

0 comments on commit efea1d0

Please sign in to comment.