Changeset 64eed1d0 in OpenModelica


Ignore:
Timestamp:
2020-11-10T16:25:08+01:00 (4 years ago)
Author:
Mahder Gebremedhin <mahder.gebremedhin@…>
Children:
423c76e1
Parents:
b5b42711
git-author:
Mahder Gebremedhin <mahder.gebremedhin@…> (11/01/20 12:15:53)
git-committer:
Mahder Gebremedhin <mahder.gebremedhin@…> (11/10/20 16:25:08)
Message:

[cmake] Generate OpenModelicaScriptingAPI.mo

  • This was missing. CMake compilation worked only because the normal OpenModelica compilation generated this file. The CMake compilation was just picking up that file and never complained.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/Compiler/CMakeLists.txt

    rffcb20dc r64eed1d0  
    9898endmacro(add_compile_step)
    9999
     100
     101
     102add_custom_command(
     103    DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Script/OpenModelicaScriptingAPI.mos
     104            ${CMAKE_CURRENT_SOURCE_DIR}/FrontEnd/ModelicaBuiltin.mo
     105
     106    # We want to generate OpenModelicaScriptingAPI.mo in scripts folder. Since the script
     107    # generates it in the current working directory we go there. Later we can fix the script to
     108    # take a path or change the MM source list to pick up the generated OpenModelicaScriptingAPI.mo
     109    # from <build_dir>/Compiler.
     110    WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/Script
     111
     112    COMMAND ${OMC_EXE} -g=MetaModelica -n=1 ${CMAKE_CURRENT_SOURCE_DIR}/Script/OpenModelicaScriptingAPI.mos
     113
     114    OUTPUT ${CMAKE_CURRENT_SOURCE_DIR}/Script/OpenModelicaScriptingAPI.mo
     115    COMMENT "Generating ${CMAKE_CURRENT_SOURCE_DIR}/Script/OpenModelicaScriptingAPI.mo using ${CMAKE_CURRENT_SOURCE_DIR}/Script/OpenModelicaScriptingAPI.mos"
     116)
    100117
    101118
Note: See TracChangeset for help on using the changeset viewer.