- C++ compiler with C++17 support
- CMake: Download here
- Sphinx: for documentation (Download)
- Doxygen: for documentation (Download)
- GNU Flex: for test suite verification (GitHub)
- readline (for Lua support): Download here
Ensure you have initialized OMSimulator submodules:
git submodule update --init --recursive
Or, when cloning:
git clone https://github.com/OpenModelica/OMSimulator.git --recurse-submodules
-
Configure OMSimulator:
cd OMSimulator cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
-
Build and Install:
cmake --build build/ --target install ./install/bin/OMSimulator --version
-
Set Up OMDev:
- Clone OMDev:
git clone https://openmodelica.org/git/OMDev.git
- Follow the setup instructions in
OMDev/INSTALL.txt
- Clone OMDev:
-
Configure OMSimulator:
cd OMSimulator cmake -S . -B build/ -G "MSYS Makefiles" -DCMAKE_INSTALL_PREFIX=install/
-
Build and Install:
cmake --build build/ --target install ./install/bin/OMSimulator --version
- Supported: Visual Studio 2017 and later.
- Required: Visual C++ Build Tools (Download)
-
Open Visual Studio Command Prompt
-
Configure OMSimulator:
cd OMSimulator cmake -S . -B build/ -DCMAKE_INSTALL_PREFIX=install/
-
Build and Install:
cmake --build build/ --config Release --target install ./install/bin/OMSimulator.exe --version
-
Build Test Dependencies:
cmake --build build/ --target testsuite-depends
-
Run Tests:
cd testsuite/partest/ ./runtests.pl -j4
- Use
-jN
to specifyN
threads.
- Use
Testing requires the OMDev mingw shell:
-
Build Test Dependencies:
cmake --build build/ --target testsuite-depends
-
Run Tests:
cd testsuite/partest/ ./runtests.pl -j4 -platform=win
- Use
-jN
to specifyN
threads.
- Use