Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Redo "Like java, python breaks mmalloc with FreeBSD+MC. Disable it."
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Jan 2019 11:57:49 +0000 (12:57 +0100)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 9 Jan 2019 12:01:05 +0000 (13:01 +0100)
Check option 'enable_python' *after* its declaration.

This fixes commit 882355d6bdf10129df36e89e4a0a5182959600ff.

CMakeLists.txt

index 5356565..85d9903 100644 (file)
@@ -375,15 +375,9 @@ if(enable_model-checking)
   include_directories(${LIBDW_INCLUDE_DIR} ${LIBELF_INCLUDE_DIR} ${LIBEVENT_INCLUDE_DIR})
   set(SIMGRID_DEP "${SIMGRID_DEP} ${LIBEVENT_LIBRARIES} ${LIBELF_LIBRARIES} ${LIBDW_LIBRARIES}")
   set(SIMGRID_HAVE_MC 1)
-  if("${CMAKE_SYSTEM}" MATCHES "FreeBSD")
-    if (enable_java)
-      message(WARNING "FreeBSD + Model-Checking + Java = too much for now. Disabling java")
-      set(enable_java FALSE)
-    endif()
-    if (enable_python)
-      message(WARNING "FreeBSD + Model-Checking + Python = too much for now. Disabling python")
-      set(enable_python FALSE)
-    endif()
+  if("${CMAKE_SYSTEM}" MATCHES "FreeBSD" AND enable_java)
+    message(WARNING "FreeBSD + Model-Checking + Java = too much for now. Disabling java")
+    set(enable_java FALSE)
   endif()
 else()
   SET(SIMGRID_HAVE_MC 0)  
@@ -782,6 +776,11 @@ if(NOT PYTHONLIBS_FOUND)
 endif()
 option(enable_python "Whether the Python bindings are activated." ${pybind11_FOUND}) # ON by default if dependencies are met
 
+if("${CMAKE_SYSTEM}" MATCHES "FreeBSD" AND enable_model-checking AND enable_python)
+  message(WARNING "FreeBSD + Model-Checking + Python = too much for now. Disabling python")
+  set(enable_python FALSE)
+endif()
+
 if(enable_python)
   if(pybind11_FOUND)
     pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp)