summaryrefslogtreecommitdiffhomepage
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2024-02-10 07:39:57 +0100
committerStanislaw Halik <sthalik@misaki.pl>2024-02-10 07:39:57 +0100
commit92c17482e7a758ff2690519932193e85856a159e (patch)
treeb409cd2007c5f148b292c0b3a8193133c6bb3eda /CMakeLists.txt
parent78570ccc1f2d964bf5b361724a4eac88c0a14b9f (diff)
cmake: fix splitdebug with asan
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4de40998..77f4af8d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -234,7 +234,14 @@ function(fm_install_executable self)
if(NOT CMAKE_OBJCOPY)
message(FATAL_ERROR "objcopy missing")
endif()
- set(exe "${self}${CMAKE_EXECUTABLE_SUFFIX}")
+ get_property(self_ TARGET "${self}" PROPERTY OUTPUT_NAME)
+ if (NOT "${self_}" STREQUAL "")
+ set(exe "${self_}")
+ message("${self} ${self_}")
+ else()
+ set(exe "${self}")
+ endif()
+ set(exe "${exe}${CMAKE_EXECUTABLE_SUFFIX}")
add_custom_command(TARGET ${self} POST_BUILD
COMMAND "${CMAKE_OBJCOPY}" --only-keep-debug "${exe}" "${exe}.debug"
COMMAND "${CMAKE_OBJCOPY}" --strip-all "${exe}" "${exe}.nodebug"