link_flag: actually set the response variable

This commit is contained in:
Danny Robson 2017-01-25 18:43:46 +11:00
parent 7df08f6818
commit dfdf4da1b1

View File

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