diff options
author | Brad King <brad.king@kitware.com> | 2009-09-01 17:03:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2009-09-01 17:03:12 (GMT) |
commit | dc78838737a14a887e2932cb06a0adaaf8c80fef (patch) | |
tree | 776a96e34f7bd49a49baca60eed27d7d0cd0ff06 /Modules/FortranCInterface | |
parent | 90cc5c5e046be5fd73af84d8d99ff1fb3c6fcf8b (diff) | |
download | CMake-dc78838737a14a887e2932cb06a0adaaf8c80fef.zip CMake-dc78838737a14a887e2932cb06a0adaaf8c80fef.tar.gz CMake-dc78838737a14a887e2932cb06a0adaaf8c80fef.tar.bz2 |
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.
Diffstat (limited to 'Modules/FortranCInterface')
-rw-r--r-- | Modules/FortranCInterface/Verify/CMakeLists.txt | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt index 69fde2d..7d75991 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() |