Skip to content

Commit

Permalink
Merge pull request #123 from cvanaret/link_gfortran
Browse files Browse the repository at this point in the history
[CMake] Link the Fortran compiler when static libraries are linked
  • Loading branch information
cvanaret authored Dec 2, 2024
2 parents d5defd6 + cd89193 commit b5db871
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,10 @@ endif()
add_library(uno STATIC ${UNO_SOURCE_FILES})
set_property(TARGET uno PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(uno PUBLIC ${DIRECTORIES})
target_link_libraries(uno PUBLIC ${LIBRARIES})
target_link_libraries(uno PUBLIC ${LIBRARIES}
# link Fortran compiler even when static libraries are linked
${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}
)

######################
# optional AMPL main #
Expand Down

0 comments on commit b5db871

Please sign in to comment.