Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[misc] remove smpimain from libsimgrid
[simgrid.git] / tools / cmake / MakeLib.cmake
index 1a92e3557a9cb197e43938918f1174c12ff4eae8..aa7aeac67f6b1b0804f24d06fcf8512f32863c79 100644 (file)
@@ -1,6 +1,6 @@
 ### Make Libs
 
-# On Mac OSX, specify that rpath is useful to look for the dependencies
+# 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
 set(CMAKE_MACOSX_RPATH TRUE)
 if(APPLE)
@@ -77,7 +77,7 @@ if(HAVE_POSIX_GETTIME)
   SET(SIMGRID_DEP "${SIMGRID_DEP} -lrt")
 endif()
 
-if("${CMAKE_SYSTEM}" MATCHES "FreeBSD")
+if("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD")
   set(SIMGRID_DEP "${SIMGRID_DEP} -lprocstat")
 endif()
 
@@ -104,6 +104,9 @@ if(enable_smpi)
       SET(SIMGRID_DEP "${SIMGRID_DEP} -lflang")
       if("${CMAKE_SYSTEM}" MATCHES "FreeBSD")
         set(SIMGRID_DEP "${SIMGRID_DEP} -lexecinfo")
+        if ("${CMAKE_SYSTEM_VERSION}" MATCHES "12")
+            set(SIMGRID_DEP "${SIMGRID_DEP} -lpgmath")
+        endif()
       endif()
     endif()
   endif()