I am trying to add a library to implicitly link against for the Absoft Fortran compiler. CMake generates the libraries to implicitly link against for this compiler seemingly from source code, since the Compiler/Absoft-Fortran and Platforum/Linux-Absoft contain nothing about what libraries to implicitly link against. The cmake.in file that the CMake Fortran module uses to configure the compiler also contains @ references for its values. I am also forcing CMake to recognize the compiler as Absoft since, via normal detection processes, Absoft will identify itself as GNUFortran.
I need to add the U77 library to implicitly link against. Doing the following in the top level CMakeList does not work: set(CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES} U77 CACHE STRING "stuff" FORCE) and it even shows up in my cache as only U77. However, when I set it for Ada in my top level CMakeList, the output compiler information file does correctly recognize the libraries to implicitly link against. This may be, however, because all the Ada modules for our build configuration were created by me since CMake does not come with any. I could institute a 'sed' command to change the implicit link libraries in the CMakeFiles/CMakeFortranCompilerInformation file, but I feel that is not only inelegant but probably opening a can of worms in case a 'make' command causes a reconfiguration at a lower level of the build tree. Is there any method in CMake to add another library for a CMake recognized compiler to implicitly link against? If not, does anyone know of a good hack that will not have unforeseen consequences?
-- 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