Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build static and shared versions of ModelicaExternalC
- We now exclusively use CMake to build ModelicaExternalC. This means even for the autotools + Makefile build system, we use CMake to build ModelicaExternalC. This has made the CMakeLists.txt for ModelicaExternalC a tad bit complicated. It is now used to compile just ModelicaExternalC as a standalone project when asked by the autotools + Makefile build. This is signified by setting MODELICA_EXTERNAL_C_STANDALONE=ON when configuring it. In this mode it will first look for find and setup the required libraries (zlib and libOpenModelicaRuntimeC). In the other mode (OpenModelica's new CMake build) it just acts as any other CMakeLists.txt file and uses the required libraries from the OpenModelica project. The shared version of the Modelica libs are isntalled to a specific directory lib/<arch>/omc/ffi so that they are not in the link path for Simulation executables. They are only intended for libFFI based loading by omc and not for actual linking. - The ModelicaExternalC builds have been adjusted for MSVC as well.
- Loading branch information
Showing
7 changed files
with
304 additions
and
96 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
fda2dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mahge I'm getting errors like
for the Windows CMake build after updating to the latest master commit. I guess this commit caused the problem.
fda2dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to update 3rdparty submodule.
fda2dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already did. I'm on cb1a1d0068989519c7bb51477040bd168963b8a6.
fda2dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahhh I forgot to merge the PR 🤦♂️. I will merge it.
You can just do
In OpenModelica in the meantime. Instead of getting in 3rdParty and checking out master. I think it should work.
fda2dde
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is now fixed with #8542.