Skip to content

Commit

Permalink
[cmake] Complete libSimulationRuntimeC linkage.
Browse files Browse the repository at this point in the history
  - Complete the link dependencies of libSimulationRuntimeC.

  - Remove ::static suffixes

    - Remove the ::static suffix from libraries since our default build
      target type is static libraries by default. We do not build anything
      as shared library now (at least not intentionally.)

      There will be few shared libs later. For collecting the static libs
      and providing all the functionality in one library. But that is special
      and our intention is not to build any individual libs as shared libs.

  - Add alias for expat

    - Expat is needed for libSimulationRuntimeC.
      We use the expat from FMIL (since it is available and built there)

  - Add aliases for more Sundials libs.

    - Also factorize the include directory providing a little bit. See the
      comments in the code.
  • Loading branch information
mahge committed Aug 23, 2021
1 parent c1adfd7 commit 67c5bae
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion OMCompiler/3rdParty
Submodule 3rdParty updated 1 files
+26 −9 CMakeLists.txt
2 changes: 1 addition & 1 deletion OMCompiler/Compiler/runtime/CMakeLists.txt
Expand Up @@ -149,7 +149,7 @@ target_sources(omcbackendruntime PRIVATE ${OMC_BACKENDRUNTIIME_SOURCES})
target_link_libraries(omcbackendruntime PUBLIC omc::config)
target_link_libraries(omcbackendruntime PUBLIC ${Intl_LIBRARIES})
target_link_libraries(omcbackendruntime PUBLIC omc::simrt::memory)
target_link_libraries(omcbackendruntime PUBLIC omc::3rd::fmilib::static)
target_link_libraries(omcbackendruntime PUBLIC omc::3rd::fmilib)
target_link_libraries(omcbackendruntime PUBLIC omc::3rd::metis)

target_include_directories(omcbackendruntime PUBLIC ${Intl_INCLUDE_DIRS})
Expand Down
14 changes: 12 additions & 2 deletions OMCompiler/SimulationRuntime/c/cmake_3.14.cmake
Expand Up @@ -69,7 +69,7 @@ add_library(omc::simrt::fmiruntime ALIAS OpenModelicaFMIRuntimeC)

target_sources(OpenModelicaFMIRuntimeC PRIVATE ${OMC_SIMRT_FMI_SOURCES})

target_link_libraries(OpenModelicaFMIRuntimeC PUBLIC omc::3rd::fmilib::static)
target_link_libraries(OpenModelicaFMIRuntimeC PUBLIC omc::3rd::fmilib)

install(TARGETS OpenModelicaFMIRuntimeC)

Expand All @@ -86,10 +86,20 @@ target_sources(SimulationRuntimeC PRIVATE ${OMC_SIMRT_SIMULATION_SOURCES}

target_link_libraries(SimulationRuntimeC PUBLIC omc::config)
target_link_libraries(SimulationRuntimeC PUBLIC omc::simrt::memory)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::cvode::static)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::FMIL::expat)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::cvode)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::idas)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::kinsol)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::sunlinsolklu)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::sundials::sunlinsollapackdense)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::config)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::klu)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::amd)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::btf)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::colamd)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::suitesparse::umfpack)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::cminpack)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::cdaskr)
target_link_libraries(SimulationRuntimeC PUBLIC omc::3rd::lis)

# Fix me. Make an interface (header only library) out of 3rdParty/dgesv
Expand Down

0 comments on commit 67c5bae

Please sign in to comment.