Commit 99b75c4 1 parent 6861bde commit 99b75c4 Copy full SHA for 99b75c4
File tree 3 files changed +31
-3
lines changed
3 files changed +31
-3
lines changed Original file line number Diff line number Diff line change 1
- f09947f8e5e9d026157666ffcdc59468d88a6343
1
+ 431a672b7cbbdcad0a0fd9d799ca33d8a3f7084f
Original file line number Diff line number Diff line change @@ -9,23 +9,45 @@ marco_add_runtime_static_library(OptionsSimulation_static
9
9
${OPTIONS_SRC} )
10
10
11
11
# Declare the library driving the simulation.
12
+ # Both the versions lead to static objects, but differ in the linked libraries.
13
+ # The '_static' version depends only on static libraries.
12
14
marco_add_runtime_static_library(Simulation
13
15
CLI.cpp
14
16
Profiler.cpp
15
17
Runtime.cpp
16
18
Scheduler.cpp)
17
19
18
- target_link_libraries (Simulation
19
- PUBLIC
20
+ target_compile_definitions (Simulation PUBLIC SHARED_DEPS)
21
+
22
+ marco_add_runtime_static_library(Simulation_static
23
+ CLI.cpp
24
+ Profiler.cpp
25
+ Runtime.cpp
26
+ Scheduler.cpp)
27
+
28
+ set (SIMULATION_LINKED_LIBS
20
29
CLI
21
30
Modeling
22
31
Multithreading
23
32
OptionsSimulation)
24
33
34
+ target_link_libraries (Simulation
35
+ PUBLIC
36
+ ${SIMULATION_LINKED_LIBS}
37
+ DriverKINSOL)
38
+
39
+ target_link_libraries (Simulation_static
40
+ PUBLIC
41
+ ${SIMULATION_LINKED_LIBS} )
42
+
25
43
if (MARCO_PROFILING)
26
44
target_link_libraries (Simulation
27
45
PUBLIC
28
46
Profiling)
47
+
48
+ target_link_libraries (Simulation_static
49
+ PUBLIC
50
+ Profiling)
29
51
endif ()
30
52
31
53
# Declare the library used to make the simulation executable.
Original file line number Diff line number Diff line change 1
1
#include " marco/Runtime/Simulation/Runtime.h"
2
2
#include " marco/Runtime/CLI/CLI.h"
3
3
#include " marco/Runtime/Drivers/Driver.h"
4
+ #include " marco/Runtime/Drivers/KINSOL/CLI.h"
4
5
#include " marco/Runtime/Multithreading/CLI.h"
5
6
#include " marco/Runtime/Printers/Printer.h"
6
7
#include " marco/Runtime/Profiling/Profiling.h"
@@ -240,6 +241,11 @@ void runtimeDeinit(Simulation &simulationInfo) {
240
241
#endif
241
242
242
243
cli += driver->getCLIOptions ();
244
+
245
+ #ifdef SHARED_DEPS
246
+ cli += std::make_unique<sundials::kinsol::CommandLineOptions>();
247
+ #endif
248
+
243
249
cli += printer->getCLIOptions ();
244
250
245
251
argh::parser cmdl (argc, argv);
You can’t perform that action at this time.
0 commit comments