Debian Codegraph @

Tests/RunCMake/CheckCompilerFlag/CheckCompilerFlagOBJC.cmake

raw
1 enable_language (OBJC)
2 include(CheckCompilerFlag)
3
4 set(OBJC 1) # test that this is tolerated
5
6 check_compiler_flag(OBJC "-_this_is_not_a_flag_" SHOULD_FAIL)
7 if(SHOULD_FAIL)
8 message(SEND_ERROR "invalid OBJC compile flag didn't fail.")
9 endif()
10
11 check_compiler_flag(OBJC "-Wall" SHOULD_WORK)
12 if(NOT SHOULD_WORK)
13 message(SEND_ERROR "${CMAKE_OBJC_COMPILER_ID} compiler flag '-Wall' check failed")
14 endif()