Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Link with KINSOL driver in case of static builds #31

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jenkins/version_llvm.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
f09947f8e5e9d026157666ffcdc59468d88a6343
431a672b7cbbdcad0a0fd9d799ca33d8a3f7084f
26 changes: 24 additions & 2 deletions lib/Simulation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,23 +9,45 @@ marco_add_runtime_static_library(OptionsSimulation_static
${OPTIONS_SRC})

# Declare the library driving the simulation.
# Both the versions lead to static objects, but differ in the linked libraries.
# The '_static' version depends only on static libraries.
marco_add_runtime_static_library(Simulation
CLI.cpp
Profiler.cpp
Runtime.cpp
Scheduler.cpp)

target_link_libraries(Simulation
PUBLIC
target_compile_definitions(Simulation PUBLIC SHARED_DEPS)

marco_add_runtime_static_library(Simulation_static
CLI.cpp
Profiler.cpp
Runtime.cpp
Scheduler.cpp)

set(SIMULATION_LINKED_LIBS
CLI
Modeling
Multithreading
OptionsSimulation)

target_link_libraries(Simulation
PUBLIC
${SIMULATION_LINKED_LIBS}
DriverKINSOL)

target_link_libraries(Simulation_static
PUBLIC
${SIMULATION_LINKED_LIBS})

if (MARCO_PROFILING)
target_link_libraries(Simulation
PUBLIC
Profiling)

target_link_libraries(Simulation_static
PUBLIC
Profiling)
endif()

# Declare the library used to make the simulation executable.
Expand Down
6 changes: 6 additions & 0 deletions lib/Simulation/Runtime.cpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#include "marco/Runtime/Simulation/Runtime.h"
#include "marco/Runtime/CLI/CLI.h"
#include "marco/Runtime/Drivers/Driver.h"
#include "marco/Runtime/Drivers/KINSOL/CLI.h"
#include "marco/Runtime/Multithreading/CLI.h"
#include "marco/Runtime/Printers/Printer.h"
#include "marco/Runtime/Profiling/Profiling.h"
Expand Down Expand Up @@ -240,6 +241,11 @@ void runtimeDeinit(Simulation &simulationInfo) {
#endif

cli += driver->getCLIOptions();

#ifdef SHARED_DEPS
cli += std::make_unique<sundials::kinsol::CommandLineOptions>();
#endif

cli += printer->getCLIOptions();

argh::parser cmdl(argc, argv);
Expand Down
Loading