summaryrefslogtreecommitdiff
path: root/Modules/FortranCInterface/Verify/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FortranCInterface/Verify/CMakeLists.txt')
-rw-r--r--Modules/FortranCInterface/Verify/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt
index 69fde2d7ca..7d75991a24 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()