X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/ffe35f14793ff11fe9f1c4f7e78f6596ebfcc6e6..5330d44e5213b85b875764156c28b2ddc1b4fabf:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 1c2ac8ea73..1524a17c8f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -182,15 +182,6 @@ if(WIN32) set(INCLUDES ${INCLUDES} ${CMAKE_INCLUDE_WIN}) unset(CMAKE_INCLUDE_WIN) - find_program(NSIS_PROGRAM NAMES makensi) - set(NSIS_WIN_VERSION $ENV{PROCESSOR_ARCHITEW6432}) - if(NSIS_WIN_VERSION MATCHES "") - set(NSIS_WIN_VERSION $ENV{PROCESSOR_ARCHITECTURE}) - endif() - if(${NSIS_WIN_VERSION}) - string(TOLOWER ${NSIS_WIN_VERSION} NSIS_WIN_VERSION) - endif() - set(_XBT_WIN32 1) message(STATUS "C_COMPILER ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_VERSION}") @@ -223,7 +214,7 @@ IF(CMAKE_SYSTEM_PROCESSOR MATCHES ".86|AMD64|amd64") if (MSVC) message(STATUS "Disable fast raw contextes on Microsoft Visual.") else() - set(HAVE_RAWCTX 1) + set(HAVE_RAW_CONTEXTS 1) endif() ENDIF() @@ -276,27 +267,30 @@ if(Boost_FOUND AND Boost_CONTEXT_FOUND) # We should use feature detection for this instead: if (Boost_VERSION LESS 105600) message("Found Boost.Context API v1") - set(HAVE_BOOST_CONTEXT 1) + set(HAVE_BOOST_CONTEXTS 1) else() message("Found Boost.Context API v2") - set(HAVE_BOOST_CONTEXT 2) + set(HAVE_BOOST_CONTEXTS 2) endif() else() message (" boost : found.") message (" boost-context: missing. Install libboost-context-dev for this optional feature.") - set(HAVE_BOOST_CONTEXT 0) + set(HAVE_BOOST_CONTEXTS 0) endif() # Checks for header libraries functions. CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN_IN_LIBDL) CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO) -CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD) -CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB) -CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB) -CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB) -CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB) CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME) +if(NOT WIN32) # We don't want to have winpthread-1.dll in the jarfile + CHECK_LIBRARY_EXISTS(pthread pthread_create "" HAVE_PTHREAD) + CHECK_LIBRARY_EXISTS(pthread sem_init "" HAVE_SEM_INIT_LIB) + CHECK_LIBRARY_EXISTS(pthread sem_open "" HAVE_SEM_OPEN_LIB) + CHECK_LIBRARY_EXISTS(pthread sem_timedwait "" HAVE_SEM_TIMEDWAIT_LIB) + CHECK_LIBRARY_EXISTS(pthread pthread_mutex_timedlock "" HAVE_MUTEX_TIMEDLOCK_LIB) +endif() + if(CMAKE_SYSTEM_NAME MATCHES "Darwin") set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE") elseif(MINGW) @@ -389,8 +383,8 @@ if(WIN32) # Those files are not detected despite being present set(HAVE_MAKECONTEXT 1) endif() -set(CONTEXT_UCONTEXT 0) -set(CONTEXT_THREADS 0) +set(HAVE_UCONTEXT_CONTEXTS 0) +set(HAVE_THREAD_CONTEXTS 0) if(enable_jedule) set(HAVE_JEDULE 1) @@ -431,6 +425,9 @@ if(enable_smpi) elseif("${CMAKE_SYSTEM}" MATCHES "^FreeBSD") SET(USE_LIBUTIL 0) SET(HAVE_PRIVATIZATION 0) + else() + message (STATUS "Warning: no support for SMPI automatic privatization on this platform") + SET(HAVE_PRIVATIZATION 0) endif() endif() @@ -629,18 +626,15 @@ endif() #If can have both context if(HAVE_UCONTEXT) - set(CONTEXT_UCONTEXT 1) + set(HAVE_UCONTEXT_CONTEXTS 1) message("-- Support for ucontext factory") endif() if(HAVE_PTHREAD) - set(CONTEXT_THREADS 1) + set(HAVE_THREAD_CONTEXTS 1) message("-- Support for thread context factory") endif() -# Temp hack to disable context: -set(HAVE_RAWCTX 0) - ############### ## GIT version check ## @@ -760,7 +754,7 @@ else() elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "i686") set(PTH_STACKGROWTH "-1") else() - message(ERROR "Could not figure the stack direction.") + message(FATAL_ERROR "Could not figure out the stack direction. Test prog returned: ${stack}; CMAKE_SYSTEM_PROCESSOR: ${CMAKE_SYSTEM_PROCESSOR}.") endif() endif() @@ -1134,8 +1128,6 @@ endif() SET_DIRECTORY_PROPERTIES(PROPERTIES ADDITIONAL_MAKE_CLEAN_FILES "${generated_files_to_clean}") -configure_file("${CMAKE_HOME_DIRECTORY}/tools/cmake/src/simgrid.nsi.in" "${CMAKE_BINARY_DIR}/simgrid.nsi" @ONLY IMMEDIATE) - ### Define source packages for Libs include(${CMAKE_HOME_DIRECTORY}/tools/cmake/DefinePackages.cmake) @@ -1183,7 +1175,7 @@ else() find_program(WGET_PROGRAM NAMES wget) message(STATUS "wget: ${WGET_PROGRAM}") if(WGET_PROGRAM) - ADD_CUSTOM_TARGET(simgrid_documentation + ADD_CUSTOM_TARGET(documentation COMMENT "Downloading the SimGrid documentation..." COMMAND ${WGET_PROGRAM} -r -np -nH -nd http://simgrid.gforge.inria.fr/simgrid/${release_version}/doc/ WORKING_DIRECTORY ${CMAKE_HOME_DIRECTORY}/doc/html