summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeTestFortranCompiler.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-07-19 16:50:40 (GMT)
committerKitware Robot <kwrobot@kitware.com>2021-07-19 16:50:58 (GMT)
commit8802d8f8e40cfa61733be7b36ec4b06d7e35575d (patch)
tree99b4cbd8f6768b4cbf7fa139e2800692f0605440 /Modules/CMakeTestFortranCompiler.cmake
parent2579e7c1f3c95040216c648260bfd17699c9df24 (diff)
parent3ddd7f35760055fc501d454f9029f3987536957b (diff)
downloadCMake-8802d8f8e40cfa61733be7b36ec4b06d7e35575d.zip
CMake-8802d8f8e40cfa61733be7b36ec4b06d7e35575d.tar.gz
CMake-8802d8f8e40cfa61733be7b36ec4b06d7e35575d.tar.bz2
Merge topic 'enable_language-CMP0126'
3ddd7f3576 enable_language: Fix test for working compiler with CMP0126 NEW behavior Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !6355
Diffstat (limited to 'Modules/CMakeTestFortranCompiler.cmake')
-rw-r--r--Modules/CMakeTestFortranCompiler.cmake3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/CMakeTestFortranCompiler.cmake b/Modules/CMakeTestFortranCompiler.cmake
index 4fdec94..579f83f 100644
--- a/Modules/CMakeTestFortranCompiler.cmake
+++ b/Modules/CMakeTestFortranCompiler.cmake
@@ -43,6 +43,9 @@ if(NOT CMAKE_Fortran_COMPILER_WORKS)
PRINT *, 'Hello'
END
")
+ # Clear result from normal variable.
+ unset(CMAKE_Fortran_COMPILER_WORKS)
+ # Puts test result in cache variable.
try_compile(CMAKE_Fortran_COMPILER_WORKS ${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testFortranCompiler.f
OUTPUT_VARIABLE OUTPUT)