link_flag: actually set the response variable
This commit is contained in:
parent
7df08f6818
commit
dfdf4da1b1
@ -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})
|
||||||
|
Loading…
Reference in New Issue
Block a user