Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of https://framagit.org/simgrid/simgrid
[simgrid.git] / tools / cmake / MakeLib.cmake
index b0b8837cf0230182a8b823cfb04dc9a05d28a5d0..11cf6b9c283162cfd3995e2caccb555163d59da6 100644 (file)
@@ -2,6 +2,7 @@
 
 # On macOS, specify that rpath is useful to look for the dependencies
 # See https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling and Java.cmake
+# TODO: is it still useful now that Java is gone? For Python maybe?
 set(CMAKE_MACOSX_RPATH TRUE)
 if(APPLE)
   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # When installed, use system path
@@ -35,6 +36,12 @@ else()
   set(EXTRA_DIST ${EXTRA_DIST} ${STHREAD_SRC})
 endif()
 
+if(HAVE_MMALLOC)
+  add_library(sgmalloc SHARED ${SGMALLOC_SRC})
+  set_property(TARGET sgmalloc
+                APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
+endif()
+
 if(enable_model-checking)
   add_executable(simgrid-mc ${MC_SIMGRID_MC_SRC})
   target_link_libraries(simgrid-mc simgrid)
@@ -88,6 +95,10 @@ if(HAVE_GRAPHVIZ)
   endif()
 endif()
 
+if(SIMGRID_HAVE_JSON)
+  target_link_libraries(simgrid  nlohmann_json::nlohmann_json)
+endif()
+
 if(NOT ${DL_LIBRARY} STREQUAL "")
   SET(SIMGRID_DEP "${SIMGRID_DEP} ${DL_LIBRARY}")
 endif()
@@ -133,7 +144,7 @@ if(enable_smpi)
        if ("${CMAKE_SYSTEM_VERSION}" STRGREATER_EQUAL "12")
             set(SIMGRID_DEP "${SIMGRID_DEP} -lpgmath")
         endif()
-        if ("${CMAKE_SYSTEM_VERSION}" MATCHES "12\.1")
+        if ("${CMAKE_SYSTEM_VERSION}" MATCHES "12\\.1")
             set(SIMGRID_DEP "${SIMGRID_DEP} -lomp")
         endif()
       endif()