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})