Skip to content
This repository was archived by the owner on May 18, 2019. It is now read-only.

Commit 9062175

Browse files
rfrankeOpenModelica-Hudson
authored andcommitted
Remove duplicate and erroneous Modelica external C libs, ticket:4772
Use libs from C runtime for Cpp as well, see also modelica/ModelicaStandardLibrary#2470 Belonging to [master]: - #2229
1 parent bf329a1 commit 9062175

File tree

4 files changed

+5
-39
lines changed

4 files changed

+5
-39
lines changed

Compiler/Template/CodegenCpp.tpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3203,7 +3203,7 @@ case "gcc" then
32033203
CFLAGS_STATIC=$(CFLAGS_COMMON) <%staticIncludes%> -DRUNTIME_STATIC_LINKING -DENABLE_SUNDIALS_STATIC
32043204

32053205
MINGW_EXTRA_LIBS=<%if boolOr(stringEq(makefileParams.platform, "win32"),stringEq(makefileParams.platform, "win64")) then ' -lz -lhdf5 ' else ''%>
3206-
MODELICA_EXTERNAL_LIBS=-lModelicaExternalC -lModelicaStandardTables -L$(LAPACK_LIBS) $(LAPACK_LIBRARIES) $(MINGW_EXTRA_LIBS)
3206+
MODELICA_EXTERNAL_LIBS=-L$(LAPACK_LIBS) $(LAPACK_LIBRARIES) $(MINGW_EXTRA_LIBS)
32073207

32083208
LDSYSTEMFLAGS_COMMON=-L"$(OMHOME)/lib/<%getTriple()%>/omc/cpp" $(BASE_LIB) <%additionalLinkerFlags_GCC%> -Wl,-rpath,"$(OMHOME)/lib/<%getTriple()%>/omc/cpp" <%timeMeasureLink%> -L"$(BOOST_LIBS)" $(BOOST_LIBRARIES) $(LINUX_LIB_DL)
32093209
LDMAINFLAGS_COMMON=-L"$(OMHOME)/lib/<%getTriple()%>/omc/cpp" -L"$(OMHOME)/bin" -L"$(BOOST_LIBS)" $(BOOST_LIBRARIES) $(LINUX_LIB_DL) <%additionalLinkerFlags_GCC%> -Wl,-rpath,"$(OMHOME)/lib/<%getTriple()%>/omc/cpp" <%if boolOr(stringEq(makefileParams.platform, "win32"),stringEq(makefileParams.platform, "win64")) then ' -lwsock32 -lws2_32 ' else ''%>

Compiler/Template/CodegenFMUCpp.tpl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -698,9 +698,9 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
698698
# /link - [linker options and libraries]
699699
# /LIBPATH: - Directories where libs can be found
700700
OMCPP_SOLVER_LIBS=OMCppNewton_static.lib OMCppDgesv_static.lib OMCppDgesvSolver_static.lib
701-
MODELICA_EXTERNAL_LIBS=ModelicaExternalC.lib ModelicaStandardTables.lib OMCppModelicaUtilities_static.lib
701+
MODELICA_UTILITIES_LIB=OMCppModelicaUtilities_static.lib
702702
EXTRA_LIBS=<%dirExtra%> <%libsExtra%>
703-
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_static.lib OMCppMath_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) $(EXTRA_LIBS) $(MODELICA_EXTERNAL_LIBS)
703+
LDFLAGS=/link /DLL /NOENTRY /LIBPATH:"<%makefileParams.omhome%>/lib/omc/cpp/msvc" /LIBPATH:"<%makefileParams.omhome%>/bin" OMCppSystem_static.lib OMCppMath_static.lib OMCppExtensionUtilities_static.lib OMCppFMU_static.lib $(OMCPP_SOLVER_LIBS) $(EXTRA_LIBS) $(MODELICA_UTILITIES_LIB)
704704
PLATFORM="<%makefileParams.platform%>"
705705

706706
MODELICA_SYSTEM_LIB=<%fileNamePrefix%>
@@ -796,9 +796,9 @@ case SIMCODE(modelInfo=MODELINFO(__), makefileParams=MAKEFILE_PARAMS(__), simula
796796
BINARIES=<%fileNamePrefix%>$(DLLEXT)
797797

798798
OMCPP_LIBS=-lOMCppSystem_static -lOMCppMath_static -lOMCppModelicaUtilities_static -lOMCppFMU_static $(OMCPP_SOLVER_LIBS) -lOMCppExtensionUtilities_static
799-
MODELICA_EXTERNAL_LIBS=-lModelicaExternalC -lModelicaStandardTables -lOMCppModelicaUtilities_static
799+
MODELICA_UTILITIES_LIB=-lOMCppModelicaUtilities_static
800800
EXTRA_LIBS=<%dirExtra%> <%libsExtra%>
801-
LIBS=$(OMCPP_LIBS) $(EXTRA_LIBS) $(MODELICA_EXTERNAL_LIBS) $(BASE_LIB)
801+
LIBS=$(OMCPP_LIBS) $(EXTRA_LIBS) $(MODELICA_UTILITIES_LIB) $(BASE_LIB)
802802

803803
# link with simple dgesv or full lapack
804804
ifeq ($(USE_DGESV),ON)

SimulationRuntime/cpp/CMakeLists.txt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,6 @@ OPTION(TRILINOS_ROOT "TRILINOS ROOT" "")
9191
OPTION(USE_CPP_03 "USE_CPP_03" OFF)
9292

9393
#Set Variables
94-
SET(MODELICAEXTERNALCDIR "${CMAKE_SOURCE_DIR}/../../3rdParty/ModelicaExternalC/C-Sources")
95-
SET(USERTABDIR "${CMAKE_SOURCE_DIR}/../../libraries/Resources/Data/Tables")
96-
9794
IF(NOT FMU_TARGET)
9895
SET(LIBINSTALLEXT "lib/omc/cpp" CACHE STRING "library directory")
9996
ENDIF(NOT FMU_TARGET)
@@ -108,10 +105,6 @@ SET(SolverName ${LIBPREFIX}Solver${LIBSUFFIX})
108105
SET(SystemName ${LIBPREFIX}System${LIBSUFFIX})
109106
SET(OMCFactoryName ${LIBPREFIX}OMCFactory${LIBSUFFIX})
110107
SET(MathName ${LIBPREFIX}Math${LIBSUFFIX})
111-
SET(ModelicaExternalName ModelicaExternalC) # only static version
112-
SET(ModelicaTablesName ModelicaStandardTables) # only static version
113-
SET(LibZName zlib) # only static version
114-
SET(ModelicaMatIOName ModelicaMatIO) # only static version
115108

116109
SET(SimulationSettings ${LIBPREFIX}SimulationSettings${LIBSUFFIX})
117110
SET(SimControllerName ${LIBPREFIX}SimController${LIBSUFFIX})
@@ -837,7 +830,6 @@ add_subdirectory(Core/Solver)
837830
add_subdirectory(Core/Math)
838831
add_subdirectory(Core/Utils/Modelica)
839832
add_subdirectory(Core/Utils/extension)
840-
add_subdirectory(Core/ModelicaExternalC)
841833

842834
if(NOT FMU_TARGET)
843835
# add projects for generating a simulator

SimulationRuntime/cpp/Core/ModelicaExternalC/CMakeLists.txt

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)