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) macro(check_link_flag _variable _flag)
string (MAKE_C_IDENTIFIER ${_flag} _name) 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}") set (CMAKE_EXE_LINKER_FLAGS "${__check_linker_flag_old}")
endif () endif ()
if (__check_link_flag_${_name}) set (${_variable} ${__check_link_flag_${_name}})
set (${variable} 1)
else()
set (${variable} 0)
endif()
endmacro() endmacro()
##-----------------------------------------------------------------------------
macro(append_link_flag _flag) macro(append_link_flag _flag)
check_link_flag (__test_link_flag_${_flag} ${_flag}) check_link_flag (__test_link_flag_${_flag} ${_flag})
if (__test_link_flag_${_flag}) if (__test_link_flag_${_flag})