1 enable_language (Fortran)
2 include(CheckCompilerFlag)
4 set(Fortran 1) # test that this is tolerated
6 check_compiler_flag(Fortran "-_this_is_not_a_flag_" SHOULD_FAIL)
8 message(SEND_ERROR "invalid Fortran compile flag didn't fail.")
11 if(CMAKE_Fortran_COMPILER_ID STREQUAL "GNU|LCC")
12 check_compiler_flag(Fortran "-Wall" SHOULD_WORK)
14 message(SEND_ERROR "${CMAKE_Fortran_COMPILER_ID} compiler flag '-Wall' check failed")