-
Notifications
You must be signed in to change notification settings - Fork 305
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CMake FMU: Copy runtime library dependencies into FMU (#9441)
* CMake FMUs with library runtime dependencies - Needs CMake >= v3.21 - Add runtime dependencies to install * New flag --fmuRuntimeDepends - Include none, modelica or all runtime dependencies. - Defaults to modelica. * Add ORIGIN to RPATH * Test if removal of .fmutmp directory was succesfull * Removed dead code SimCodeMain * Downgrading minimum CMake version to 3.5 * Added CMake FMU export test case * Disable CMake FMUs for cross-compilation export
- Loading branch information
1 parent
f2a0f69
commit 42e1d1b
Showing
10 changed files
with
111 additions
and
46 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
// name: cmakeFMU.mos | ||
// status: correct | ||
// keywords: fmu export cmake dynamic | ||
// teardown_command: rm -rf DualMassOscillator.System1.fmu DualMassOscillator.System1_FMU* DualMassOscillator_System1_systemCall.log | ||
|
||
loadFile("DualMassOscillator.mo"); getErrorString(); | ||
setCommandLineOptions("--fmuCMakeBuild=true --fmuRuntimeDepends=none"); getErrorString(); | ||
buildModelFMU(DualMassOscillator.System1, platforms={"dynamic"}); getErrorString(); | ||
|
||
system(getInstallationDirectoryPath() + "/bin/OMSimulator DualMassOscillator.System1.fmu", "DualMassOscillator_System1_systemCall.log"); | ||
readFile("DualMassOscillator_System1_systemCall.log"); | ||
|
||
// Result: | ||
// true | ||
// "Notification: Automatically loaded package Modelica 3.2.2 due to uses annotation. | ||
// Notification: Automatically loaded package Complex 3.2.2 due to uses annotation. | ||
// Notification: Automatically loaded package ModelicaServices 3.2.2 due to uses annotation. | ||
// " | ||
// true | ||
// "" | ||
// "DualMassOscillator.System1.fmu" | ||
// "" | ||
// 0 | ||
// "info: maximum step size for 'model.root': 0.001000 | ||
// info: Result file: model_res.mat (bufferSize=10) | ||
// info: Final Statistics for 'model.root': | ||
// NumSteps = 1001 NumRhsEvals = 1002 NumLinSolvSetups = 51 | ||
// NumNonlinSolvIters = 1001 NumNonlinSolvConvFails = 0 NumErrTestFails = 0 | ||
// " | ||
// endResult |
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