From dc78838737a14a887e2932cb06a0adaaf8c80fef Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 1 Sep 2009 13:03:12 -0400 Subject: [PATCH] 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. --- Modules/FortranCInterface/Verify/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt index 69fde2d7c..7d75991a2 100644 --- a/Modules/FortranCInterface/Verify/CMakeLists.txt +++ b/Modules/FortranCInterface/Verify/CMakeLists.txt @@ -14,3 +14,8 @@ FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran) include_directories(${VerifyFortranC_BINARY_DIR}) 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()