[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.1 1.2

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Sep 1 13:03:15 EDT 2009


Update of /cvsroot/CMake/CMake/Modules/FortranCInterface/Verify
In directory public:/mounts/ram/cvs-serv10869/Modules/FortranCInterface/Verify

Modified Files:
	CMakeLists.txt 
Log Message:
Fix FortranCInterface_VERIFY for non-C++ case

The verification program entry point (main) is defined in a C source
file, so the C compiler should be used to link when only Fortran and C
are involved.  The C++ compiler should still be used when the CXX option
is enabled.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FortranCInterface/Verify/CMakeLists.txt,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** CMakeLists.txt	24 Aug 2009 12:49:28 -0000	1.1
--- CMakeLists.txt	1 Sep 2009 17:03:12 -0000	1.2
***************
*** 15,16 ****
--- 15,21 ----
  
  add_executable(VerifyFortranC main.c VerifyC.c VerifyFortran.f ${VerifyCXX})
+ 
+ if(NOT VERIFY_CXX)
+   # The entry point (main) is defined in C; link with the C compiler.
+   set_property(TARGET VerifyFortranC PROPERTY LINKER_LANGUAGE C)
+ endif()



More information about the Cmake-commits mailing list