X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/4ba8fa73394ad3a5649ab15eebc39606983c4a1c..1fd15d2c07a6c04bc8dd130ea48abd79ae714731:/buildtools/Cmake/CompleteInFiles.cmake diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index be1ac6ad22..c15c13b5db 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -6,6 +6,7 @@ ${CMAKE_HOME_DIRECTORY}/buildtools/Cmake/Modules message(STATUS "Cmake version ${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}") include(CheckFunctionExists) +include(CheckTypeSize) include(CheckIncludeFile) include(CheckIncludeFiles) include(CheckLibraryExists) @@ -13,7 +14,9 @@ include(TestBigEndian) TEST_BIG_ENDIAN(BIGENDIAN) include(FindGraphviz) +if(enable_pcre) include(FindPCRE) +endif(enable_pcre) if(enable_gtnets) include(FindGTnets) endif(enable_gtnets) @@ -59,6 +62,8 @@ CHECK_INCLUDE_FILE("strings.h" HAVE_STRINGS_H) CHECK_INCLUDE_FILE("string.h" HAVE_STRING_H) CHECK_INCLUDE_FILE("ucontext.h" HAVE_UCONTEXT_H) CHECK_INCLUDE_FILE("stdio.h" HAVE_STDIO_H) +CHECK_INCLUDE_FILE("linux/futex.h" HAVE_FUTEX_H) + CHECK_FUNCTION_EXISTS(gettimeofday HAVE_GETTIMEOFDAY) CHECK_FUNCTION_EXISTS(usleep HAVE_USLEEP) @@ -109,6 +114,12 @@ else(enable_model-checking AND HAVE_MMAP) SET(MMALLOC_WANT_OVERIDE_LEGACY 0) endif(enable_model-checking AND HAVE_MMAP) +#-------------------------------------------------------------------------------------------------- +### Check for some architecture dependent values +CHECK_TYPE_SIZE(int SIZEOF_INT) +CHECK_TYPE_SIZE(void* SIZEOF_VOIDP) + + #-------------------------------------------------------------------------------------------------- ### Initialize of CONTEXT THREADS @@ -203,20 +214,15 @@ if(mcsc MATCHES "no" AND pthread) endif(HAVE_WINDOWS_H) endif(mcsc MATCHES "no" AND pthread) -if(with_context MATCHES "ucontext" AND mcsc MATCHES "no") - message(FATAL_ERROR "-Dwith-context=ucontext specified but ucontext unusable.") -endif(with_context MATCHES "ucontext" AND mcsc MATCHES "no") - #Only windows -if(with_context MATCHES "windows") +if(WIN32) if(NOT HAVE_WINDOWS_H) message(FATAL_ERROR "no appropriate backend found windows") endif(NOT HAVE_WINDOWS_H) -endif(with_context MATCHES "windows") +endif(WIN32) if(windows_context MATCHES "yes") - set(with_context "windows") message(STATUS "Context change to windows") endif(windows_context MATCHES "yes")