From 36f62bca6d533b835c548ed2e5dcda72f1f64bfb Mon Sep 17 00:00:00 2001 From: Charlie Vanaret Date: Mon, 2 Dec 2024 21:05:04 +0100 Subject: [PATCH] Finally figured out how to link the Fortran compiler when linking static libraries --- CMakeLists.txt | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index d08e4706..4957b2a5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,9 +50,9 @@ file(GLOB UNO_SOURCE_FILES uno/ingredients/globalization_strategies/switching_methods/funnel_methods/*.cpp uno/ingredients/hessian_models/*.cpp uno/ingredients/local_models/*.cpp - uno/ingredients/inequality_handling_methods/*.cpp - uno/ingredients/inequality_handling_methods/inequality_constrained_methods/*.cpp - uno/ingredients/inequality_handling_methods/interior_point_methods/*.cpp + uno/ingredients/inequality_handling_methods/*.cpp + uno/ingredients/inequality_handling_methods/inequality_constrained_methods/*.cpp + uno/ingredients/inequality_handling_methods/interior_point_methods/*.cpp uno/model/*.cpp uno/optimization/*.cpp uno/options/*.cpp @@ -208,7 +208,7 @@ 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} ${CMAKE_Fortran_IMPLICIT_LINK_LIBRARIES}) ###################### # optional AMPL main #