View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0012421CMakeCMakepublic2011-08-25 17:182016-06-10 14:31
ReporterBudo Zindovic 
Assigned ToBrad King 
PriorityhighSeveritymajorReproducibilityalways
StatusclosedResolutionmoved 
PlatformOSWindowsOS VersionXP
Product VersionCMake 2.8.5 
Target VersionFixed in Version 
Summary0012421: Fortran-C/C++ interoperability test fail
DescriptionDuring the configuration for mixed language build, CMake tests whether C/C++ and FORTRAN compilers can interact with each other. After the initial configuration, one test (FortranCInterface.sln) is build successfully but the other (VerifyFortranC.sln) fails to compile. After a careful look into the project that wasn't build properly, I saw that the project VerifyFortranC.sln has been messed up so that it contains C/C++ and Fortran sources.

Main problem is that compilation of this project would work if Microsoft Visual Studio had a built-in FORTRAN compiler (that would work on Linux). Since this is not the case, the solution would be to built these two separately (one would be FORTRAN and the other would be C/C++ project) and then link them together.
Steps To ReproduceTo reproduce this bug, the user is required to build any mixed lanugage programming library. This example uses Trilinos library:

1. Extract library to a desired location
2. Open the Cmake-GUI and point to the source and desired build directory
3. set TPL_ENABLE_BLAS, TPL_ENABLE_LAPACK, Trilinos_ENABLE_Amesos, Trilinos_ENABLE_AztecOO, Trilinos_ENABLE_Belos and Trilinos_ENABLE_CTrilinos to ON
4. Set-up the paths to BLAS/LAPACK and CLapack libraries
5. Click Configure
Additional InformationAttachment contains two zipped versions of the VerifyFortranC.sln project: one is the original output from CMake 2.8.6 (its name is VerifyCXX-Original.zip) and the proposition of the layout for this test (two projects separated for FORTRAN and for C/C++ test and is named VerifyCXX-Suggestion.zip). This proposed version is the one I have successfully built on my machine but the options are tuned for Debug and Release Configuration only (MinSizeRel and RelWithDebInfo were not set-up at all).
TagsNo tags attached.
Attached Fileszip file icon VerifyCXX.zip [^] (1,812,150 bytes) 2011-08-25 17:19

 Relationships

  Notes
(0027282)
Brad King (manager)
2011-08-29 10:27

Try this (untested) patch to the CMake Modules directory:

diff --git a/Modules/FortranCInterface/Verify/CMakeLists.txt b/Modules/FortranCInterface/Verify/CMakeLists.txt
index 052dd59..0a3980a 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 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.
(0030551)
Brad King (manager)
2012-08-13 10:44

Sending issues I'm not actively working on to the backlog to await someone with time for them.

If an issue you care about is sent to the backlog when you feel it should have been addressed in a different manner, please bring it up on the CMake mailing list for discussion. Sign up for the mailing list here, if you're not already on it:

 http://www.cmake.org/mailman/listinfo/cmake [^]

It's easy to re-activate a bug here if you can find a CMake developer or contributor who has the bandwidth to take it on.
(0041890)
Kitware Robot (administrator)
2016-06-10 14:28

Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2011-08-25 17:18 Budo Zindovic New Issue
2011-08-25 17:19 Budo Zindovic File Added: VerifyCXX.zip
2011-08-29 10:22 Brad King Assigned To => Bill Hoffman
2011-08-29 10:22 Brad King Status new => assigned
2011-08-29 10:23 Brad King Assigned To Bill Hoffman => Brad King
2011-08-29 10:27 Brad King Note Added: 0027282
2012-08-13 10:44 Brad King Status assigned => backlog
2012-08-13 10:44 Brad King Note Added: 0030551
2016-06-10 14:28 Kitware Robot Note Added: 0041890
2016-06-10 14:28 Kitware Robot Status backlog => resolved
2016-06-10 14:28 Kitware Robot Resolution open => moved
2016-06-10 14:31 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team