X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/359e5f78deb09f53d88e0055e97ded73fef5486d..db05675574d8c8bfafd025fbaadf6e145ce41ecb:/buildtools/Cmake/CompleteInFiles.cmake diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index c8e72265ad..cb9488380e 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -13,7 +13,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) @@ -203,59 +205,28 @@ 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 -set(with_context_ok 0) -if(with_context MATCHES "windows") - set(with_context_ok 1) +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") - -if(with_context MATCHES "pthreads") - set(with_context_ok 1) - set(with_context "pthread") -endif(with_context MATCHES "pthreads") - -if(with_context MATCHES "auto") - set(with_context_ok 1) - set(with_context "ucontext") - message(STATUS "With_context auto change to ucontext") -endif(with_context MATCHES "auto") - -if(with_context MATCHES "ucontext") - set(with_context_ok 1) - if(mcsc) - set(CONTEXT_UCONTEXT 1) - else(mcsc) - if(windows_context MATCHES "yes") - set(with_context "windows") - message(STATUS "With_context ucontext change to windows") - else(windows_context MATCHES "yes") - set(with_context "pthread") - message(STATUS "With_context ucontext change to pthread") - endif(windows_context MATCHES "yes") - endif(mcsc) -endif(with_context MATCHES "ucontext") - -if(with_context MATCHES "pthread") - set(with_context_ok 1) - if(NOT pthread) - message(FATAL_ERROR "Cannot find pthreads (try -Dwith_context=ucontext if you haven't already tried).") - endif(NOT pthread) - SET(CONTEXT_THREADS 1) -endif(with_context MATCHES "pthread") - -if(with_context MATCHES "ucontext") - SET(CONTEXT_THREADS 0) -endif(with_context MATCHES "ucontext") - -if(NOT with_context_ok) - message(FATAL_ERROR "-Dwith-context must be either ucontext or pthread") -endif(NOT with_context_ok) +endif(WIN32) + +if(windows_context MATCHES "yes") + message(STATUS "Context change to windows") +endif(windows_context MATCHES "yes") + +#If can have both context + +if(mcsc) + set(CONTEXT_UCONTEXT 1) +endif(mcsc) + +if(pthread) + set(CONTEXT_THREADS 1) +endif(pthread) + ############### ## SVN version check