Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
sys/time.h is always defined nowadays
[simgrid.git] / CMakeLists.txt
index 18f50ca..24dee6b 100644 (file)
@@ -170,7 +170,6 @@ ENDIF()
 
 if(WIN32)
 
-  #Need env INCLUDE
   set(CMAKE_INCLUDE_WIN "${CMAKE_C_COMPILER}")
   set(CMAKE_LIB_WIN "${CMAKE_C_COMPILER}")
   string(REGEX REPLACE "/bin/gcc.*" "/include"  CMAKE_INCLUDE_WIN "${CMAKE_INCLUDE_WIN}")
@@ -178,8 +177,6 @@ if(WIN32)
   set(INCLUDES ${INCLUDES} ${CMAKE_INCLUDE_WIN})
   unset(CMAKE_INCLUDE_WIN)
 
-  set(_XBT_WIN32 1)
-
 endif()
 
 include_directories(${INCLUDES})
@@ -286,7 +283,6 @@ CHECK_INCLUDE_FILE("sys/ptrace.h" HAVE_SYS_PTRACE_H)
 CHECK_INCLUDE_FILE("unistd.h" HAVE_UNISTD_H)
 CHECK_INCLUDE_FILE("execinfo.h" HAVE_EXECINFO_H)
 CHECK_INCLUDE_FILE("signal.h" HAVE_SIGNAL_H)
-CHECK_INCLUDE_FILE("sys/time.h" HAVE_SYS_TIME_H)
 CHECK_INCLUDE_FILE("sys/param.h" HAVE_SYS_PARAM_H)
 CHECK_INCLUDE_FILE("sys/sysctl.h" HAVE_SYS_SYSCTL_H)
 CHECK_INCLUDE_FILE("ucontext.h" HAVE_UCONTEXT_H)
@@ -514,23 +510,11 @@ endif()
 if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
   add_definitions(-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE)
 endif()
-
-if(WIN32)
-  # We always provide our own implementation of ucontext on Windows.
-  try_compile(HAVE_UCONTEXT
-    ${CMAKE_BINARY_DIR}
-    ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_AC_CHECK_MCSC.c
-    COMPILE_DEFINITIONS -D_XBT_WIN32 -I${CMAKE_HOME_DIRECTORY}/src/include -I${CMAKE_HOME_DIRECTORY}/src/xbt
-  )
-else()
-  # We always provide our own implementation of ucontext on Windows.
-  try_compile(HAVE_UCONTEXT
+try_compile(HAVE_UCONTEXT
     ${CMAKE_BINARY_DIR}
     ${CMAKE_HOME_DIRECTORY}/tools/cmake/test_prog/prog_AC_CHECK_MCSC.c)
-endif()
 
 #If can have both context
-
 if(HAVE_UCONTEXT)
   set(HAVE_UCONTEXT_CONTEXTS 1)
   message("-- Support for ucontext factory")
@@ -604,15 +588,6 @@ if(HAVE_UCONTEXT_H)
     set(makecontext_CPPFLAGS_2 "-D_XOPEN_SOURCE=700")
   endif()
 
-  if(WIN32)
-    if(ARCH_32_BITS)
-      set(makecontext_CPPFLAGS "-DTEST_makecontext -D_I_X86_")
-    else()
-      set(makecontext_CPPFLAGS "-DTEST_makecontext -D_AMD64_")
-    endif()
-    set(makecontext_CPPFLAGS_2 "-D_XBT_WIN32 -I${CMAKE_HOME_DIRECTORY}/src/include -I${CMAKE_HOME_DIRECTORY}/src/xbt")
-  endif()
-
   file(REMOVE ${CMAKE_BINARY_DIR}/conftestval)
 
   if(CMAKE_CROSSCOMPILING)
@@ -635,8 +610,6 @@ if(HAVE_UCONTEXT_H)
     string(REPLACE "," "" makecontext_size "${MAKECONTEXT_SIZE}")
     set(pth_skaddr_makecontext "#define pth_skaddr_makecontext(skaddr,sksize) (${makecontext_addr})")
     set(pth_sksize_makecontext "#define pth_sksize_makecontext(skaddr,sksize) (${makecontext_size})")
-  else()
-    # message(FATAL_ERROR "makecontext is not compilable")
   endif()
 endif()
 
@@ -954,7 +927,6 @@ message("HAVE_VALGRIND_VALGRIND_H ....: ${HAVE_VALGRIND_VALGRIND_H}")
 message("HAVE_UNISTD_H ...............: ${HAVE_UNISTD_H}")
 message("HAVE_EXECINFO_H .............: ${HAVE_EXECINFO_H}")
 message("HAVE_SIGNAL_H ...............: ${HAVE_SIGNAL_H}")
-message("HAVE_SYS_TIME_H .............: ${HAVE_SYS_TIME_H}")
 message("HAVE_DLFCN_H ................: ${HAVE_DLFCN_H}")
 
 message("")