X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/cdf6a962eb4e88efbed3df9c41343adabcf09e6c..211bea03c5b015471f0616961c3a9e8ed0c43802:/tools/cmake/MakeLib.cmake diff --git a/tools/cmake/MakeLib.cmake b/tools/cmake/MakeLib.cmake index 480b93436c..b29b5921d7 100644 --- a/tools/cmake/MakeLib.cmake +++ b/tools/cmake/MakeLib.cmake @@ -60,7 +60,7 @@ if (HAVE_BOOST_ADDR2LINE_BACKTRACE) endif() if(CMAKE_USE_PTHREADS_INIT) - set(SIMGRID_DEP "${SIMGRID_DEP} ${CMAKE_THREAD_LIBS_INIT}") + target_link_libraries(simgrid ${CMAKE_THREAD_LIBS_INIT}) endif() if(SIMGRID_HAVE_LUA) @@ -133,6 +133,9 @@ if(enable_smpi) if ("${CMAKE_SYSTEM_VERSION}" MATCHES "12") set(SIMGRID_DEP "${SIMGRID_DEP} -lpgmath") endif() + if ("${CMAKE_SYSTEM_VERSION}" MATCHES "12\.1") + set(SIMGRID_DEP "${SIMGRID_DEP} -lomp") + endif() endif() endif() endif() @@ -165,7 +168,7 @@ endif() mark_as_advanced(GCCLIBATOMIC_LIBRARY) if(enable_model-checking AND (NOT LINKER_VERSION VERSION_LESS "2.30")) - set(SIMGRID_DEP "${SIMGRID_DEP} -Wl,-znoseparate-code") + set(SIMGRID_DEP "${SIMGRID_DEP} -Wl,-znorelro -Wl,-znoseparate-code") endif() target_link_libraries(simgrid ${SIMGRID_DEP})