From 4efef62f0ead16b4f8ca2c6ccf0a77ce112f73b9 Mon Sep 17 00:00:00 2001 From: Mike McLaughlin Date: Tue, 15 Mar 2016 16:04:06 -0700 Subject: Strip symbols on release builds into separate binaries Issue #3669 Created a common cmake strip_symbols function that all the modules and programs use to strip the symbols out of the main into a separate .dbg (Linux) or .dSYM (OSX) file. Added an install_clr cmake function to encapsulate the install logic. Changed all the library module cmake install lines from a TARGETS to a FILES one. The TARGETS based install directives caused cmake to relink the binary and copy the unstripped version to the install path. Left the all programs like corerun or ildasm as TARGETS installs because on OSX FILES type installs don't get marked as executable. Need to use "get_property(strip_source_file TARGET ${targetName} PROPERTY LOCATION)" for the older versions of cmake and "set(strip_source_file $)" on newer versions (v3 or greater). --- src/dlls/dbgshim/CMakeLists.txt | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'src/dlls/dbgshim') diff --git a/src/dlls/dbgshim/CMakeLists.txt b/src/dlls/dbgshim/CMakeLists.txt index 655cb0a28b..c3ebaf5d06 100644 --- a/src/dlls/dbgshim/CMakeLists.txt +++ b/src/dlls/dbgshim/CMakeLists.txt @@ -71,7 +71,4 @@ endif(WIN32) target_link_libraries(dbgshim ${DBGSHIM_LIBRARIES}) # add the install targets -install (TARGETS dbgshim DESTINATION .) -if(WIN32) - install (FILES ${CMAKE_CURRENT_BINARY_DIR}/$/dbgshim.pdb DESTINATION PDB) -endif(WIN32) +install_clr(dbgshim) -- cgit v1.2.3