File: CheckCLinkerFlag.cmake

package info (click to toggle)
wavpack 5.9.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 4,340 kB
  • sloc: ansic: 27,542; asm: 9,843; sh: 5,640; makefile: 172
file content (9 lines) | stat: -rw-r--r-- 300 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
include(CMakePushCheckState)
include(CheckCSourceCompiles)

macro(CHECK_C_LINKER_FLAG _FLAG _RESULT)
    cmake_push_check_state(RESET)
    set(CMAKE_REQUIRED_FLAGS "${_FLAG}")
    check_c_source_compiles("int main() { return 0;}" ${_RESULT})
    cmake_pop_check_state()
endmacro(CHECK_C_LINKER_FLAG)