diff options
Diffstat (limited to 'cmake/Modules/CompilerRTUtils.cmake')
-rw-r--r-- | cmake/Modules/CompilerRTUtils.cmake | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/cmake/Modules/CompilerRTUtils.cmake b/cmake/Modules/CompilerRTUtils.cmake index b8eef90bb..e22e77535 100644 --- a/cmake/Modules/CompilerRTUtils.cmake +++ b/cmake/Modules/CompilerRTUtils.cmake @@ -46,13 +46,16 @@ macro(append_if condition value) endif() endmacro() +# Appends value to all strings in ARGN, if the condition is true. +macro(append_string_if condition value) + if(${condition}) + foreach(str ${ARGN}) + set(${str} "${${str}} ${value}") + endforeach() + endif() +endmacro() + macro(append_no_rtti_flag list) append_if(COMPILER_RT_HAS_FNO_RTTI_FLAG -fno-rtti ${list}) append_if(COMPILER_RT_HAS_GR_FLAG /GR- ${list}) endmacro() - -macro(add_definitions_if condition) - if(${condition}) - add_definitions(${ARGN}) - endif() -endmacro() |