From dfdf4da1b1bb9d32f14eb7b0c12fc02804b57958 Mon Sep 17 00:00:00 2001 From: Danny Robson Date: Wed, 25 Jan 2017 18:43:46 +1100 Subject: [PATCH] link_flag: actually set the response variable --- link_flag.cmake | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/link_flag.cmake b/link_flag.cmake index 16bfa8f..954b299 100644 --- a/link_flag.cmake +++ b/link_flag.cmake @@ -1,3 +1,4 @@ +############################################################################### macro(check_link_flag _variable _flag) string (MAKE_C_IDENTIFIER ${_flag} _name) @@ -22,14 +23,11 @@ macro(check_link_flag _variable _flag) set (CMAKE_EXE_LINKER_FLAGS "${__check_linker_flag_old}") endif () - if (__check_link_flag_${_name}) - set (${variable} 1) - else() - set (${variable} 0) - endif() + set (${_variable} ${__check_link_flag_${_name}}) endmacro() +##----------------------------------------------------------------------------- macro(append_link_flag _flag) check_link_flag (__test_link_flag_${_flag} ${_flag}) if (__test_link_flag_${_flag})