Fixed syntax

This commit is contained in:
Alvin Moore 2020-01-15 02:51:16 -08:00
parent 76c8a93cac
commit ae7e8cbcba
1 changed files with 2 additions and 1 deletions

View File

@ -134,7 +134,8 @@ function(strip_debug_symbols target)
set(out_files "${out_file}")
if(is_exec AND NOT APPLE)
add_custom_command(OUTPUT "${out_file}.debug"
COMMAND objcopy --verbose --only-keep-debug $<TARGET_FILE:${target}> "${out_file}.debug" &> "${out_file}.objcopy1" && if [ -f "${out_file}" ]; then objcopy --verbose --add-gnu-debuglink="${out_file}.debug" "${out_file}" &> "${out_file}.objcopy2"; fi
COMMAND objcopy --verbose --only-keep-debug $<TARGET_FILE:${target}> "${out_file}.debug" &> "${out_file}.objcopy1"
COMMAND objcopy --verbose --add-gnu-debuglink="${out_file}.debug" "${out_file}" &> "${out_file}.objcopy2"
COMMENT "Copy debug symbols to ${out_name}.debug")
list(APPEND out_files "${out_file}.debug")
endif()