Skip to content

Commit

Permalink
Remove obsolete OMCppSystem_FMU_static
Browse files Browse the repository at this point in the history
Use regular OMCppSystem_static instead that is compiled with
-DENABLE_SUNDIALS_STATIC without causing more link dependencies.
  • Loading branch information
rfranke committed Feb 5, 2016
1 parent 6d7b093 commit 86500a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 11 deletions.
4 changes: 2 additions & 2 deletions Compiler/Template/CodegenFMUCpp.tpl
Expand Up @@ -678,7 +678,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
# /link - [linker options and libraries]
# /LIBPATH: - Directories where libs can be found
OMCPP_SOLVER_LIBS=OMCppNewton_static.lib OMCppDgesv_static.lib
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_FMU_static.lib OMCppMath_static.lib OMCppModelicaUtilities_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) ModelicaExternalC.lib ModelicaStandardTables.lib
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_static.lib OMCppMath_static.lib OMCppModelicaUtilities_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) ModelicaExternalC.lib ModelicaStandardTables.lib
PLATFORM="win32"

MODEL_NAME=<%modelName%>
Expand Down Expand Up @@ -747,7 +747,7 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula

BINARIES=<%fileNamePrefix%>$(DLLEXT) <%platformbins%>

OMCPP_LIBS=-lOMCppSystem_FMU_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static $(OMCPP_SOLVER_LIBS) -lOMCppExtensionUtilities_static
OMCPP_LIBS=-lOMCppSystem_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static $(OMCPP_SOLVER_LIBS) -lOMCppExtensionUtilities_static
MODELICA_EXTERNAL_LIBS=-lModelicaExternalC -lModelicaStandardTables
LIBS=$(OMCPP_LIBS) $(MODELICA_EXTERNAL_LIBS) $(BASE_LIB)

Expand Down
9 changes: 0 additions & 9 deletions SimulationRuntime/cpp/Core/System/CMakeLists.txt
Expand Up @@ -17,14 +17,6 @@ add_library(${SystemName}_static STATIC AlgLoopDefaultImplementation.cpp AlgLoop
set_target_properties(${SystemName}_static PROPERTIES COMPILE_DEFINITIONS "RUNTIME_STATIC_LINKING;ENABLE_SUNDIALS_STATIC")
install (TARGETS ${SystemName}_static DESTINATION ${LIBINSTALLEXT})

add_library(${SystemName}_FMU_static STATIC AlgLoopDefaultImplementation.cpp AlgLoopSolverFactory.cpp EventHandling.cpp DiscreteEvents.cpp ContinuousEvents.cpp SystemDefaultImplementation.cpp SimVars.cpp FactoryExport.cpp)
if(FMU_SUNDIALS)
set_target_properties(${SystemName}_FMU_static PROPERTIES COMPILE_DEFINITIONS "RUNTIME_STATIC_LINKING;ENABLE_SUNDIALS_STATIC")
else(FMU_SUNDIALS)
set_target_properties(${SystemName}_FMU_static PROPERTIES COMPILE_DEFINITIONS "RUNTIME_STATIC_LINKING")
endif(FMU_SUNDIALS)
install (TARGETS ${SystemName}_FMU_static DESTINATION ${LIBINSTALLEXT})

add_library(${SystemName} SHARED AlgLoopDefaultImplementation.cpp AlgLoopSolverFactory.cpp EventHandling.cpp DiscreteEvents.cpp ContinuousEvents.cpp SystemDefaultImplementation.cpp SimVars.cpp FactoryExport.cpp)

target_link_libraries (${SystemName} ${Boost_LIBRARIES} ${LAPACK_LIBRARIES} ${OMCFactoryName}_static ${SimulationSettings} ${ExtensionUtilitiesName})
Expand All @@ -34,7 +26,6 @@ install (TARGETS ${SystemName} DESTINATION ${LIBINSTALLEXT})
if (UNIX)
set_target_properties(${SystemName} PROPERTIES COMPILE_FLAGS -fPIC)
set_target_properties(${SystemName}_static PROPERTIES COMPILE_FLAGS -fPIC)
set_target_properties(${SystemName}_FMU_static PROPERTIES COMPILE_FLAGS -fPIC)
endif(UNIX)

#IF (NOT ((${CMAKE_SYSTEM_NAME} MATCHES "Darwin") OR MSVC))
Expand Down

0 comments on commit 86500a3

Please sign in to comment.