Changeset 780c1e84 in OpenModelica


Ignore:
Timestamp:
2020-10-21T14:04:17+02:00 (3 years ago)
Author:
Mahder Gebremedhin <mahder.gebremedhin@…>
Children:
965cc7b7
Parents:
76fcdf3
git-author:
Mahder Gebremedhin <mahder.gebremedhin@…> (09/16/20 14:48:08)
git-committer:
Mahder Gebremedhin <mahder.gebremedhin@…> (10/21/20 14:04:17)
Message:

[cmake] Make corba actually optional.

  • There was an option to disable corba already. However, compilation was just supposed to fail if there was no corba support. Now it is fixed.
  • Corba support is now disabled by default. -> OMC_USE_CORBA is OFF by default.
Location:
OMCompiler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/CMakeLists.txt

    r76fcdf3 r780c1e84  
    2121
    2222# options
    23 option(OMC_USE_CORBA "Should use corba." ON)
     23option(OMC_USE_CORBA "Should use corba." OFF)
     24omc_add_to_report(OMC_USE_CORBA)
    2425
    2526
  • OMCompiler/Compiler/runtime/CMakeLists.txt

    r66b8954 r780c1e84  
    2424
    2525
    26 if(OMC_USE_CORBA AND MINGW)
     26if(OMC_USE_CORBA)
     27  if(MINGW)
    2728    # setup omniORB for MinGW OMDev
    2829    include(.cmake/omdev_omniorb_setup.cmake)
    29 
    3030    # Include the macro for compiling corba targets.
    3131    include(.cmake/omc_omniorb_corba_target.cmake)
    32 
    3332    # add a corba target for omc_communication.idl. The outputs will be put in the
    3433    # generated files directory.
    3534    omc_add_omniorb_corba_target(${OMNIIDL_EXE} ${CMAKE_CURRENT_SOURCE_DIR}/omc_communication.idl ${GENERATED_DIRECTORY})
     35    # add corba sources to source files list.
     36    set(OMC_RUNTIIME_SOURCES ${OMC_RUNTIIME_SOURCES} ${GENERATED_DIRECTORY}/omc_communication.cc omc_communication_impl.cpp Corba_omc.cpp)
     37  else(MINGW) # Not MinGW
     38    message(FATAL "Corba support for non-MinGW omc builds is not yet implemented.")
     39    # set(OMC_RUNTIIME_SOURCES ${OMC_RUNTIIME_SOURCES} ${GENERATED_DIRECTORY}/omc_communication.cc omc_communication_impl.cpp Corba_omc.cpp)
     40  endif(MINGW)
    3641
    37     set(OMC_RUNTIME_CORBA_SOURCES ${GENERATED_DIRECTORY}/omc_communication.cc omc_communication_impl.cpp Corba_omc.cpp)
    38     set(OMC_RUNTIIME_SOURCES ${OMC_RUNTIIME_SOURCES} ${OMC_RUNTIME_CORBA_SOURCES})
    39 endif(OMC_USE_CORBA AND MINGW)
     42else(OMC_USE_CORBA) # No corba support requested.
     43    set(OMC_RUNTIIME_SOURCES ${OMC_RUNTIIME_SOURCES} corbaimpl_stub_omc.o)
     44endif(OMC_USE_CORBA)
     45
     46
     47
    4048
    4149
Note: See TracChangeset for help on using the changeset viewer.