[Cmake-commits] [cmake-commits] king committed FortranCInterface.cmake 1.15 1.16

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Aug 20 16:21:56 EDT 2009


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv27611/Modules

Modified Files:
	FortranCInterface.cmake 
Log Message:
Teach FortranCInterface to verify languages

This module requires both C and Fortran to be enabled, so error-out if
they are not.


Index: FortranCInterface.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FortranCInterface.cmake,v
retrieving revision 1.15
retrieving revision 1.16
diff -C 2 -d -r1.15 -r1.16
*** FortranCInterface.cmake	5 Aug 2009 17:40:28 -0000	1.15
--- FortranCInterface.cmake	20 Aug 2009 20:21:53 -0000	1.16
***************
*** 77,80 ****
--- 77,89 ----
  
  #-----------------------------------------------------------------------------
+ # Verify that C and Fortran are available.
+ foreach(lang C Fortran)
+   if(NOT CMAKE_${lang}_COMPILER_LOADED)
+     message(FATAL_ERROR
+       "FortranCInterface requires the ${lang} language to be enabled.")
+   endif()
+ endforeach()
+ 
+ #-----------------------------------------------------------------------------
  # Set up an interface detection project.
  set(FortranCInterface_SOURCE_DIR ${CMAKE_ROOT}/Modules/FortranCInterface)



More information about the Cmake-commits mailing list