Changeset acdc3fe4 in OpenModelica


Ignore:
Timestamp:
2020-10-21T14:04:17+02:00 (4 years ago)
Author:
Mahder Gebremedhin <mahder.gebremedhin@…>
Children:
a319b8fd
Parents:
e3138910
git-author:
Mahder Gebremedhin <mahder.gebremedhin@…> (09/14/20 16:59:33)
git-committer:
Mahder Gebremedhin <mahder.gebremedhin@…> (10/21/20 14:04:17)
Message:

[cmake] Add omc.exe compilation.

  • We can now build omc.exe.
  • libOpenModelicaCompiler is built as a static library. Building it as a shared library should also work except that Boehm GC is creating problems as always. The omc.exe that is built from a shared libOpenModelicaCompiler starts but does not do anything and just hangs.

There is some proper configuration that needs to be used to compile
and also USE Boehm GC correctly with CMake.
In the meantime a static libOpenModelicaCompiler and a statically
linked omc.exe should be just fine.

Location:
OMCompiler/Compiler
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/CMakeLists.txt

    rf922c1f racdc3fe4  
    144144add_dependencies(DEPENDENCY_UPDATE DEPENDENCY_SCAN)
    145145
    146 add_library(OpenModelicaCompiler SHARED ${OMC_C_SOURCE_FILES})
     146add_library(OpenModelicaCompiler STATIC ${OMC_C_SOURCE_FILES} .cmake/omc_entry_point.c)
    147147target_compile_definitions(OpenModelicaCompiler PRIVATE ADD_METARECORD_DEFINITIONS=)
    148148
     
    163163target_link_libraries(OpenModelicaCompiler PUBLIC omc::3rd::modelica_external_c)
    164164target_link_libraries(OpenModelicaCompiler PUBLIC omc::3rd::modelica_io)
     165
     166
     167
     168
     169# OMC Executable.
     170add_executable(omc .cmake/omc_main.c)
     171target_link_libraries(omc OpenModelicaCompiler)
Note: See TracChangeset for help on using the changeset viewer.