FortranCInterface: Do not use cmake_policy(VERSION)

Do not force a specific policy version in the module because it prevents
projects from setting newer policies to NEW.  In particular, projects
may want to set CMP0056 to NEW to affect any try_compile calls in this
module.

Use of this was added in commit v2.8.2~714 (FortranCInterface: Use CMake
2.8.0 behavior, 2009-11-17) in order to set CMP0007 to NEW.  Simply set
this policy explicitly instead.
This commit is contained in:
Brad King 2015-05-19 12:59:26 -04:00
parent a4596f2048
commit b3795df2f4
1 changed files with 1 additions and 2 deletions

View File

@ -144,9 +144,8 @@ if(FortranCInterface_SOURCE_DIR)
return() return()
endif() endif()
# Use CMake 2.8.0 behavior for this module regardless of including context.
cmake_policy(PUSH) cmake_policy(PUSH)
cmake_policy(VERSION 2.8.0) cmake_policy(SET CMP0007 NEW)
#----------------------------------------------------------------------------- #-----------------------------------------------------------------------------
# Verify that C and Fortran are available. # Verify that C and Fortran are available.