summaryrefslogtreecommitdiffstats
path: root/Tests
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-02-10 14:37:48 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-02-10 14:37:48 (GMT)
commit80c080052a123b71b69bf42fa99e01df621502bb (patch)
tree85643066da7494b362a7d5da2ec4f92d9348d5fc /Tests
parent06e527b36ccb86078e0caad2cd2962057b0c0558 (diff)
parent1814cf744ce69ab97ce4a8fe8183b4d4f7f75cf4 (diff)
downloadCMake-80c080052a123b71b69bf42fa99e01df621502bb.zip
CMake-80c080052a123b71b69bf42fa99e01df621502bb.tar.gz
CMake-80c080052a123b71b69bf42fa99e01df621502bb.tar.bz2
Merge topic 'add-CheckFortranCompilerFlag'
1814cf74 Help: Add notes for topic 'add-CheckFortranCompilerFlag' 54e900ab CheckFortranCompilerFlag: Add test case 393a45e2 CheckFortranCompilerFlag: Add module to check Fortran flag existence
Diffstat (limited to 'Tests')
-rw-r--r--Tests/FortranOnly/CMakeLists.txt7
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.