summaryrefslogtreecommitdiffstats
path: root/llvm/cmake/modules/CheckLinkerFlag.cmake
blob: e96d35e7721ec434c63c0267773ef0c5d183b685 (plain)
1
2
3
4
5
6
7
8
include(CheckCXXCompilerFlag)

function(check_linker_flag flag out_var)
  set(OLD_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
  set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} ${flag}")
  check_cxx_compiler_flag("" ${out_var})
  set(CMAKE_REQUIRED_FLAGS ${OLD_CMAKE_REQUIRED_FLAGS})
endfunction()
OpenPOWER on IntegriCloud