From 18f17b254addd28a7ef22d17ce1649a2a785e774 Mon Sep 17 00:00:00 2001 From: bergmann Date: Tue, 30 Jul 2019 13:32:39 +0200 Subject: [PATCH] * Merged changes from indusol repository --- pedantic.cmake | 4 ++-- strip_symbols.cmake | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/pedantic.cmake b/pedantic.cmake index 3fd87f9..be2efde 100644 --- a/pedantic.cmake +++ b/pedantic.cmake @@ -152,7 +152,7 @@ Function ( Pedantic_Apply_Flags_Target TARGET ) ForEach ( I IN LISTS TMP ) Target_Compile_Options ( ${TARGET} ${ARG_VISIBILITY} - ${I} ) + $<$:${I}> ) EndForEach ( ) EndIf ( ) @@ -164,7 +164,7 @@ Function ( Pedantic_Apply_Flags_Target TARGET ) ForEach ( I IN LISTS TMP ) Target_Compile_Options ( ${TARGET} ${ARG_VISIBILITY} - ${I} ) + $<$:${I}> ) EndForEach ( ) EndIf ( ) diff --git a/strip_symbols.cmake b/strip_symbols.cmake index 9c12e26..bc7db1e 100644 --- a/strip_symbols.cmake +++ b/strip_symbols.cmake @@ -11,10 +11,14 @@ CMake_Minimum_Required ( VERSION 3.0 ) # TARGET_NAME - Target to strip symbols from # OUTPUT_FILENAME - Filename of the stripped debug informations Function ( Strip_Symbols TARGET_NAME OUTPUT_FILENAME ) - Find_Program ( OBJCOPY objcopy ) - If ( NOT OBJCOPY ) - Message ( FATAL_ERROR "objcopy not found" ) - EndIf ( ) + If ( CMAKE_OBJCOPY ) + Set ( OBJCOPY "${CMAKE_OBJCOPY}" ) + Else ( ) + Find_Program ( OBJCOPY objcopy ) + If ( NOT OBJCOPY ) + Message ( FATAL_ERROR "objcopy not found" ) + EndIf ( ) + EndIf () Set ( STRIP_SRC_FILE $) Set ( STRIP_DST_FILE ${STRIP_SRC_FILE}.dbg )