Skip to content

Changes

Summary

  1. Bring 3rdParty libraries into OMSimulator's CMake build system. (#1221) (details)
Commit e51bcdd4f228174c2494089ab642fb05a801cd64 by Mahder Gebremedhin
Bring 3rdParty libraries into OMSimulator's CMake build system. (#1221)

* Bring 3rdParty libraries into OMSimulators CMake build system.

  - The 3rdParty libraries used to be built as individual standalone projects
    and then were installed. The installed versions of them was then consumed
    by OMSimulator.

    Now they are part of OMSimulators own build system. They get built and
    are used as if they were just another folder in the OMSimulator project.
    This simplifies management of them considerably.

  - There are a few remaining libraries. Some are not used at all so they
    are skipped for now. Some (pthreads for MSVC) still need some special
    treatment since they do not have CMake support yet.

  - Note that the top level compilation still starts from the Makefile
    or the bat scripts. This will be changed later once everything else
    is working.

  - OMTLMSimulator is disabled for now.

* Run CMake from the root directory.

  - This affects how the given INSTALL_DIR is interpreted since it is given
    as a relative path.

* Fix path to 3rdParty sundials

* Fix inconsistency. Recent CMake versions complain about this.

* Set the needed sundials options.

* Make the OMSimulatorPython3 script executable.

* Update 3rdParty. Disable `iconv` in libxml2 when MSVC.

* Disable OMTLM for MSVC as well.

* Set the correct install directory for MSVC build.

* Cleanup the bat scripts for MSVC.

  - Remove 3rdParty libs that are now part of the unified configuration.
    There is no need to build them as standalone modules now.

* Undo changes to the python library setup.

  - For now let it stay the way it was so the tests pass. It can be fixed
    later by another set of changes.

  - Remove the library architecture directory from the lib install directory.
    This will also be added later by another set of changes.

* Now that OMTLM is removed, update tests accordingly.

* Install libraries to `lib/<lib_arch>`.

  - e.g. `<some_dir>/lib/x86_linux_gnu`.
  - Adjust the shell script `OMSimulatorPython` accordingly. It is now
    configured from `OMSimulatorPython.in` using CMake. CMake adds the
    current library architecture to it.

* Cleanup and refactoring.

  - If `OMSimulator` is being built standalone (not as part of OpenModelica)
    we include the required settings from the file
    `config.cmake/OMSimulatorTopLevelSettings.cmake`, otherwise we use the
    settings from the OpenModelica project.

  - Require a minimum of CMake 3.14 everywhere (Linux, Windows, macOS ...)

* More cleanup

* Update to merged 3rdParty
The file was modified src/OMSimulatorPython/capi.py (diff)
The file was addedconfig.cmake/OMSimulatorTopLevelSettings.cmake
The file was removedtestsuite/tlm/externalmodels.lua
The file was removedtestsuite/tlm/tlm3d.lua
The file was modified src/OMSimulator/CMakeLists.txt (diff)
The file was modified CMakeLists.txt (diff)
The file was modified src/OMSimulatorLib/OMSimulator.cpp (diff)
The file was modified configWinVS.bat (diff)
The file was removedtestsuite/tlm/Makefile
The file was modified 3rdParty (diff)
The file was modified testsuite/Makefile (diff)
The file was removedtestsuite/simulation/import_export.lua
The file was modified testsuite/api/buses.lua (diff)
The file was modified src/OMSimulatorPython/CMakeLists.txt (diff)
The file was removedtestsuite/simulation/import_export.py
The file was modified testsuite/api/test02.lua (diff)
The file was modified src/OMSimulatorPython/OMSimulatorPython3.bat (diff)
The file was modified src/OMSimulatorLib/Model.cpp (diff)
The file was removedtestsuite/tlm/tlm1dfg.lua
The file was modified Makefile (diff)
The file was modified testsuite/simulation/Makefile (diff)
The file was modified src/OMSimulatorLib/Values.cpp (diff)
The file was modified src/OMSimulatorServer/CMakeLists.txt (diff)
The file was removedtestsuite/tlm/StartTLMFmiWrapper
The file was removedtestsuite/tlm/tlm1d.lua
The file was modified src/OMSimulatorLua/CMakeLists.txt (diff)
The file was removedtestsuite/tlm/tlmbuses.lua
The file was modified src/OMSimulatorLib/Scope.cpp (diff)
The file was addedsrc/OMSimulatorPython/OMSimulatorPython3.in
The file was modified testsuite/simulation/rename.lua (diff)
The file was modified src/OMSimulatorLib/CMakeLists.txt (diff)
The file was modified src/pip/CMakeLists.txt (diff)
The file was modified buildWinVS.bat (diff)
The file was removedtestsuite/tlm/tlmsignals.lua
The file was modified testsuite/api/test02.py (diff)
The file was removedtestsuite/tlm/externalmodels.py
The file was removedtestsuite/tlm/tlmbuses.py
The file was removedsrc/OMSimulatorPython/OMSimulatorPython3
The file was modified testsuite/api/buses.py (diff)
The file was removedtestsuite/tlm/tlmexternal.lua