diff options
author | Brad King <brad.king@kitware.com> | 2015-02-05 16:18:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-02-05 16:18:13 (GMT) |
commit | 54e900abfbbddde560a853355b448e1b86681741 (patch) | |
tree | 5128b1ae2220058b58062467a90d411f58a67437 /Tests/FortranOnly | |
parent | 393a45e2e1fa2f0d9657d4a686257d828cd918e4 (diff) | |
download | CMake-54e900abfbbddde560a853355b448e1b86681741.zip CMake-54e900abfbbddde560a853355b448e1b86681741.tar.gz CMake-54e900abfbbddde560a853355b448e1b86681741.tar.bz2 |
CheckFortranCompilerFlag: Add test case
Extend the FortranOnly test with a case covering this module.
Diffstat (limited to 'Tests/FortranOnly')
-rw-r--r-- | Tests/FortranOnly/CMakeLists.txt | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Tests/FortranOnly/CMakeLists.txt b/Tests/FortranOnly/CMakeLists.txt index 1b2651d..9bf0303 100644 --- a/Tests/FortranOnly/CMakeLists.txt +++ b/Tests/FortranOnly/CMakeLists.txt @@ -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. |