Changeset d6193163 in OpenModelica


Ignore:
Timestamp:
2021-11-21T21:16:32+01:00 (2 years ago)
Author:
Mahder Gebremedhin <mahder.geb@…>
Parents:
856c29ae
Message:

Add cmake support for OMParser.

  • OMParser can now compiled with CMake. It is not build by default (it is EXCLUDED_FROM_ALL). It can be built by navigating to its build directory or you can just ask cmake to build the only target it adds, omcparserantlr4
Files:
1 added
2 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    ra61de2e1 rd6193163  
    120120## Subdirectories ##########################################################################################
    121121omc_add_subdirectory(OMCompiler)
     122omc_add_subdirectory(OMParser EXCLUDE_FROM_ALL)
    122123# omc_add_subdirectory(libraries)
    123124include(omsimulator.cmake)
  • OMParser/3rdParty/antlr4/runtime/Cpp/runtime/CMakeLists.txt

    r4023d498 rd6193163  
    2626add_library(antlr4_shared SHARED ${libantlrcpp_SRC})
    2727add_library(antlr4_static STATIC ${libantlrcpp_SRC})
     28
     29# This are needed for transitive include dirs. Ideally all include dirs should be specified
     30# like this. For now, luckily, this folder provides all the 'public' headers needed when linking to this libs.
     31target_include_directories(antlr4_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
     32target_include_directories(antlr4_static PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/src)
     33
     34# Anything that links to the static lib should use the ANTLR4CPP_STATIC define as well.
     35target_compile_definitions(antlr4_static INTERFACE -DANTLR4CPP_STATIC)
    2836
    2937set(LIB_OUTPUT_DIR "${CMAKE_HOME_DIRECTORY}/dist") # put generated libraries here.
Note: See TracChangeset for help on using the changeset viewer.