summaryrefslogtreecommitdiffstats
path: root/Modules/FortranCInterface.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2009-11-17 19:33:28 (GMT)
committerBrad King <brad.king@kitware.com>2009-11-17 19:33:28 (GMT)
commit184a3418e65bdfccb5d01c4d8611821df85a1618 (patch)
tree2b5557d02bd80ccfd6411157416eb764f539e7f9 /Modules/FortranCInterface.cmake
parenta52ebca54c19305003f46775a3851db455fba97a (diff)
downloadCMake-184a3418e65bdfccb5d01c4d8611821df85a1618.zip
CMake-184a3418e65bdfccb5d01c4d8611821df85a1618.tar.gz
CMake-184a3418e65bdfccb5d01c4d8611821df85a1618.tar.bz2
FortranCInterface: Use CMake 2.8.0 behavior
The FortranCInterface module should execute with CMake 2.8.0 behavior even if policies are set differently by the including project. In particular, it makes use of empty list elements and therefore expects NEW behavior of CMP0007.
Diffstat (limited to 'Modules/FortranCInterface.cmake')
-rw-r--r--Modules/FortranCInterface.cmake7
1 files changed, 7 insertions, 0 deletions
diff --git a/Modules/FortranCInterface.cmake b/Modules/FortranCInterface.cmake
index 7a360de..a2ef08e 100644
--- a/Modules/FortranCInterface.cmake
+++ b/Modules/FortranCInterface.cmake
@@ -100,6 +100,10 @@ if(FortranCInterface_SOURCE_DIR)
return()
endif()
+# Use CMake 2.8.0 behavior for this module regardless of including context.
+cmake_policy(PUSH)
+cmake_policy(VERSION 2.8.0)
+
#-----------------------------------------------------------------------------
# Verify that C and Fortran are available.
foreach(lang C Fortran)
@@ -273,3 +277,6 @@ function(FortranCInterface_VERIFY)
"The output was:\n ${_output}")
endif()
endfunction()
+
+# Restore including context policies.
+cmake_policy(POP)