On 07/18/2010 09:10 PM, John Cary wrote: > Thanks for your help with this. I did > INCLUDE(FortranCInterface), but I did not > see in CMakeCache.txt any variables that > might contain the fortran libs needed by > the C/C++ linkers (e.g., libgfortran). > Did I miss something?
The FortranCInterface module detects the *mangling* of Fortran symbols with respect to C and does not deal with implicit Fortran library dependencies. CMake 2.8 automatically handles the implicit libraries for mixed-language binaries. After configuring your build tree look in CMakeFiles/CMake*Compiler.cmake. There are variables like these: SET(CMAKE_C_IMPLICIT_LINK_LIBRARIES "...") SET(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "...") SET(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "stdc++;...") SET(CMAKE_CXX_IMPLICIT_LINK_DIRECTORIES "...") SET(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES "gfortranbegin;gfortran;...") SET(CMAKE_Fortran_IMPLICIT_LINK_DIRECTORIES "...") However, you should never need to reference them explicitly. When CMake generates the link line for a binary that includes both Fortran and C++ we automatically use these variables to list the libraries not known to be implicitly linked by the compiler used to drive the linker. -Brad _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake
