Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'master' of scm.gforge.inria.fr:/gitroot/simgrid/simgrid
[simgrid.git] / CMakeLists.txt
index 3ec3296..0217261 100644 (file)
@@ -194,8 +194,8 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86|AMD64|amd64")
     message(STATUS "System processor: x86_64 (${CMAKE_SYSTEM_PROCESSOR}, 64 bits)")
     set(PROCESSOR_x86_64 1)
   ENDIF()
-  if (MSVC)
-    message(STATUS "Disable fast raw contextes on Microsoft Visual.")
+  if (WIN32)
+    message(STATUS "Disable fast raw contextes on Windows.")
   else()
     set(HAVE_RAW_CONTEXTS 1)
   endif()
@@ -226,6 +226,10 @@ if(enable_ns3)
   endif()
 endif()
 
+if(WIN32)
+  set(Boost_USE_STATIC_LIBS 1)
+endif()
+
 find_package(Boost 1.48)
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
@@ -512,11 +516,10 @@ endif()
 
 if(NOT HAVE_UCONTEXT_H)
   message("-- No ucontext factory: <ucontext.h> not found.")
+elseif(APPLE)
+  message("-- No ucontext factory: Apple don't want us to use them.")
+  set(HAVE_UCONTEXT_H 0)
 else()
-  # This is needed for ucontext on MacOS X:
-  if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
-    add_definitions(-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE)
-  endif()
   try_compile(compile_makecontext ${CMAKE_BINARY_DIR} ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_makecontext.c
     OUTPUT_VARIABLE compile_makecontext_output)