diff options
author | Brad King <brad.king@kitware.com> | 2011-09-08 18:56:48 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2011-09-08 18:56:48 (GMT) |
commit | 71402eb25244e5805df54c2f6e62ddd36201dbd6 (patch) | |
tree | 08e9f14879f583aa8758f08cd7bef1dd8b08a137 /Modules/FortranCInterface | |
parent | 38aab379629a797e959f93b40ba18e63f14d1f64 (diff) | |
download | CMake-71402eb25244e5805df54c2f6e62ddd36201dbd6.zip CMake-71402eb25244e5805df54c2f6e62ddd36201dbd6.tar.gz CMake-71402eb25244e5805df54c2f6e62ddd36201dbd6.tar.bz2 |
FortranCInterface: Compile separate Fortran lib in VerifyC[XX]
The Intel Fortran plugin for Visual Studio requires Fortran source files
to be compiled in a separate target from C and C++ code. Compile the
VerifyFortran.f source file in a separate library and link the main
VerifyFortanC executable to it.
Diffstat (limited to 'Modules/FortranCInterface')
-rw-r--r-- | Modules/FortranCInterface/Verify/CMakeLists.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt index 052dd59..e969f24 100644 --- a/Modules/FortranCInterface/Verify/CMakeLists.txt +++ b/Modules/FortranCInterface/Verify/CMakeLists.txt @@ -24,7 +24,9 @@ include(FortranCInterface) FortranCInterface_HEADER(VerifyFortran.h SYMBOLS VerifyFortran) include_directories(${VerifyFortranC_BINARY_DIR}) -add_executable(VerifyFortranC main.c VerifyC.c VerifyFortran.f ${VerifyCXX}) +add_library(VerifyFortran STATIC VerifyFortran.f) +add_executable(VerifyFortranC main.c VerifyC.c ${VerifyCXX}) +target_link_libraries(VerifyFortranC VerifyFortran) if(NOT VERIFY_CXX) # The entry point (main) is defined in C; link with the C compiler. |