CheckFortranCompilerFlag: Add test case

Extend the FortranOnly test with a case covering this module.
This commit is contained in:
Brad King 2015-02-05 11:18:13 -05:00
parent 393a45e2e1
commit 54e900abfb
1 changed files with 7 additions and 0 deletions

View File

@ -65,6 +65,13 @@ if(NOT CMAKE_Fortran_COMPILER_ID STREQUAL XL)
message(SEND_ERROR "CHECK_Fortran_SOURCE_COMPILES for HAVE_PRINT failed:\n"
"${err}")
endif()
unset(Fortran_BOGUS_FLAG CACHE)
include(CheckFortranCompilerFlag)
CHECK_Fortran_COMPILER_FLAG(-_this_is_not_a_flag_ Fortran_BOGUS_FLAG)
if (Fortran_BOGUS_FLAG)
message (SEND_ERROR "CHECK_Fortran_COMPILER_FLAG() succeeded, but should have failed")
endif ()
endif()
# Test generation of preprocessed sources.