1 include(CheckLinkerFlag OPTIONAL)
3 if (COMMAND check_linker_flag)
4 macro(llvm_check_linker_flag)
5 check_linker_flag(${ARGN})
8 include(CheckCXXCompilerFlag)
9 include(CMakePushCheckState)
11 # cmake builtin compatible, except we assume lang is CXX
12 function(llvm_check_linker_flag lang flag out_var)
13 cmake_push_check_state()
14 set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag}")
15 check_cxx_compiler_flag("" ${out_var})
16 cmake_pop_check_state()