Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Inform user when model-checking has been disabled because of HAVE_MMALLOC.
[simgrid.git] / buildtools / Cmake / CompleteInFiles.cmake
index 52831ab84512aea83ab626a4c60969fad8445bd4..21931ba6e8aa4059107ddeb2248cdc63bb411120 100644 (file)
@@ -165,9 +165,9 @@ execute_process(
   )
 
 if(HAVE_thread_storage_run)
-  set(HAVE_THREAD_LOCAL_STORAGE 0)
-else()
   set(HAVE_THREAD_LOCAL_STORAGE 1)
+else()
+  set(HAVE_THREAD_LOCAL_STORAGE 0)
 endif()
 
 # Our usage of mmap is Linux-specific (flag MAP_ANONYMOUS), but kFreeBSD uses a GNU libc
@@ -176,6 +176,12 @@ IF(NOT "${CMAKE_SYSTEM}" MATCHES "Linux" AND NOT "${CMAKE_SYSTEM}" MATCHES "kFre
   message(STATUS "Warning: MMAP is thought as non functional on this architecture (${CMAKE_SYSTEM})")
 ENDIF()
 
+if(HAVE_MMAP AND HAVE_THREAD_LOCAL_STORAGE)
+  SET(HAVE_MMALLOC 1)
+else()
+  SET(HAVE_MMALLOC 0)
+endif()
+
 if(WIN32) #THOSE FILES ARE FUNCTIONS ARE NOT DETECTED BUT THEY SHOULD...
   set(HAVE_UCONTEXT_H 1)
   set(HAVE_MAKECONTEXT 1)
@@ -215,11 +221,14 @@ else()
   SET(MALLOCATOR_IS_WANTED 0)
 endif()
 
-if(enable_model-checking AND HAVE_MMAP)
+if(enable_model-checking AND HAVE_MMALLOC)
   SET(HAVE_MC 1)
   SET(MMALLOC_WANT_OVERRIDE_LEGACY 1)
   include(FindLibunwind)
 else()
+  if(enable_model-checking)
+    message(STATUS "Warning: support for model-checking has been disabled because HAVE_MMALLOC is false")
+  endif()
   SET(HAVE_MC 0)
   SET(MMALLOC_WANT_OVERRIDE_LEGACY 0)
 endif()
@@ -883,8 +892,6 @@ set(generated_files_to_clean
   ${CMAKE_BINARY_DIR}/bin/colorize
   ${CMAKE_BINARY_DIR}/bin/simgrid_update_xml
   ${CMAKE_BINARY_DIR}/examples/smpi/tracing/smpi_traced.trace
-  ${CMAKE_BINARY_DIR}/src/supernovae_sg.c
-  ${CMAKE_BINARY_DIR}/src/supernovae_smpi.c
   )
 
 if("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_HOME_DIRECTORY}")