Changeset a767f054 in OpenModelica


Ignore:
Timestamp:
2021-12-14T10:52:45+01:00 (2 years ago)
Author:
GitHub <noreply@…>
Branches:
maintenance/v1.18
Parents:
281cb6ec
git-author:
Adrian Pop <adrian.pop@…> (12/14/21 10:52:45)
git-committer:
GitHub <noreply@…> (12/14/21 10:52:45)
Message:

try to find and link the threads library (#8317) (#8319)

Location:
OMCompiler/SimulationRuntime
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • OMCompiler/SimulationRuntime/OMSICpp/CMakeLists.txt

    refa7994 ra767f054  
    485485  ADD_DEFINITIONS(-D_GLIBCXX_USE_CXX11_ABI=0)
    486486ENDIF(FMU_TARGET AND NOT MSVC)
     487
     488IF(WIN32)
     489SET(CPPTHREADS_LIBRARY)
     490SET(CPPTHREADS_LIBRARY_FLAG)
     491ELSE(WIN32)
     492find_package(Threads REQUIRED)
     493SET(CPPTHREADS_LIBRARY Threads::Threads)
     494SET(CPPTHREADS_LIBRARY_FLAG ${CMAKE_THREAD_LIBS_INIT})
     495ENDIF(WIN32)
    487496
    488497SET(Boost_LIBRARIES_TMP ${Boost_LIBRARIES_TMP} ${Boost_LIBRARIES})
  • OMCompiler/SimulationRuntime/OMSICpp/runtime/src/Core/Modelica/CMakeLists.txt

    rf1678de ra767f054  
    230230MESSAGE(STATUS "--BOOST_LIBS = ${Boost_LIBS_} " - " ${Boost_Library_folder}")
    231231MESSAGE(STATUS "--BOOST_INCLUDE = ${Boost_INCLUDE_}")
    232 MESSAGE(STATUS "--BOOST_LIBRARIES = ${Boost_LIBRARIES_}")
     232MESSAGE(STATUS "--BOOST_LIBRARIES = ${Boost_LIBRARIES_} ${CPPTHREADS_LIBRARY_}")
    233233MESSAGE(STATUS "--SUNDIALS_LIBS = ${SUNDIALS_LIBS_}")
    234234MESSAGE(STATUS "--SUNDIALS_INCLUDE = ${SUNDIALS_INCLUDE_DIR_}")
     
    239239MESSAGE(STATUS "--UMFPACK_INCLUDE = ${UMFPACK_INCLUDE_}")
    240240MESSAGE(STATUS "--UMFPACK_LIBRARIES = ${UMFPACK_LIBRARIES_}")
     241MESSAGE(STATUS "--CPPTHREADS_LIBRARY = ${CPPTHREADS_LIBRARY} ${CPPTHREADS_LIBRARY_FLAG}")
    241242MESSAGE(STATUS " ")
    242243
  • OMCompiler/SimulationRuntime/OMSICpp/runtime/src/Core/Modelica/ModelicaConfig_gcc.inc.in

    r573788c ra767f054  
    11BOOST_LIBS=@Boost_LIBS_@
    22BOOST_INCLUDE=@Boost_INCLUDE_@
    3 BOOST_LIBRARIES=@Boost_LIBRARIES_@
     3BOOST_LIBRARIES=@Boost_LIBRARIES_@ @CPPTHREADS_LIBRARY_FLAG@
    44
    55BOOST_SYSTEM_LIB=@Boost_SYSTEM_LIBRARY@
  • OMCompiler/SimulationRuntime/OMSICpp/runtime/src/SimCoreFactory/OMCFactory/CMakeLists.txt

    r09a3c55 ra767f054  
    1414target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName} wsock32 ws2_32)
    1515ELSE(WIN32)
    16 target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName} pthread)
     16target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName} ${CPPTHREADS_LIBRARY})
    1717ENDIF(WIN32)
    1818add_precompiled_header(${OMCFactoryName} runtime/include/Core/Modelica.h)
  • OMCompiler/SimulationRuntime/cpp/CMakeLists.txt

    refa7994 ra767f054  
    480480ENDIF(FMU_TARGET AND NOT MSVC)
    481481
     482IF(WIN32)
     483SET(CPPTHREADS_LIBRARY)
     484SET(CPPTHREADS_LIBRARY_FLAG)
     485ELSE(WIN32)
     486find_package(Threads REQUIRED)
     487SET(CPPTHREADS_LIBRARY Threads::Threads)
     488SET(CPPTHREADS_LIBRARY_FLAG ${CMAKE_THREAD_LIBS_INIT})
     489ENDIF(WIN32)
     490
    482491SET(Boost_LIBRARIES_TMP ${Boost_LIBRARIES_TMP} ${Boost_LIBRARIES})
    483492SET(Boost_LIBRARIES ${Boost_LIBRARIES_TMP})
  • OMCompiler/SimulationRuntime/cpp/Core/Modelica/CMakeLists.txt

    rf1678de ra767f054  
    234234MESSAGE(STATUS "--UMFPACK_INCLUDE = ${UMFPACK_INCLUDE_}")
    235235MESSAGE(STATUS "--UMFPACK_LIBRARIES = ${UMFPACK_LIBRARIES_}")
     236MESSAGE(STATUS "--CPPTHREADS_LIBRARY = ${CPPTHREADS_LIBRARY} ${CPPTHREADS_LIBRARY_FLAG}")
     237
    236238MESSAGE(STATUS " ")
    237239
  • OMCompiler/SimulationRuntime/cpp/Core/Modelica/ModelicaConfig_gcc.inc.in

    r51b27284 ra767f054  
    11BOOST_LIBS=@Boost_LIBS_@
    22BOOST_INCLUDE=@Boost_INCLUDE_@
    3 BOOST_LIBRARIES=@Boost_LIBRARIES_@
     3BOOST_LIBRARIES=@Boost_LIBRARIES_@ @CPPTHREADS_LIBRARY_FLAG@
    44
    55BOOST_SYSTEM_LIB=@Boost_SYSTEM_LIBRARY@
  • OMCompiler/SimulationRuntime/cpp/SimCoreFactory/OMCFactory/CMakeLists.txt

    r51b27284 ra767f054  
    1212target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName} wsock32 ws2_32)
    1313ELSE(WIN32)
    14 target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName})
     14target_link_libraries(${OMCFactoryName} ${Boost_LIBRARIES} ${CMAKE_DL_LIBS} ${ExtensionUtilitiesName} ${CPPTHREADS_LIBRARY})
    1515ENDIF(WIN32)
    1616add_precompiled_header(${OMCFactoryName} Include/Core/Modelica.h)
Note: See TracChangeset for help on using the changeset viewer.