include(FindGraphviz)
include(FindLibSigc++)
-set(HAVE_GTNETS 0)
-if(enable_gtnets)
- include(FindGTnets)
-endif()
if(enable_java)
find_package(Java REQUIRED COMPONENTS Runtime Development)
find_package(JNI REQUIRED)
if(enable_lua)
include(FindLua51Simgrid)
endif()
+
+set(HAVE_GTNETS 0)
+if(enable_gtnets)
+ include(FindGTnets)
+ if (NOT HAVE_GTNETS)
+ message(FATAL_ERROR "Cannot find GTNetS. Please install it, or disable that cmake option")
+ endif()
+endif()
set(HAVE_NS3 0)
if(enable_ns3)
include(FindNS3)
+ if (NOT HAVE_NS3)
+ message(FATAL_ERROR "Cannot find NS3. Please install it (apt-get install ns3 libns3-dev) or disable that cmake option")
+ endif()
endif()
# algorithm 1.50.0
# intrusive 1.35.0
# lambda 1.28.0
# signals2 1.39.0
-find_package(Boost 1.42 REQUIRED)
+find_package(Boost 1.42 COMPONENTS context)
if(Boost_FOUND)
include_directories(${Boost_INCLUDE_DIRS})
else()
if(APPLE) #MAC
- message(FATAL_ERROR, "Failed to find Boost libraries (Try to install them with 'sudo fink install boost1.53.nopython')")
+ message(FATAL_ERROR "Failed to find Boost libraries (Try to install them with 'sudo fink install boost1.53.nopython')")
+ else()
+ message(FATAL_ERROR "Failed to find Boost libraries")
+ endif()
+endif()
+
+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)
else()
- message(FATAL_ERROR, "Failed to find Boost libraries")
+ message("Found Boost.Context API v2")
+ set(HAVE_BOOST_CONTEXT 2)
endif()
+else()
+ set(HAVE_BOOST_CONTEXT 0)
endif()
# Checks for header libraries functions.
CHECK_LIBRARY_EXISTS(rt clock_gettime "" HAVE_POSIX_GETTIME)
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
- set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700")
+ set(CMAKE_REQUIRED_DEFINITIONS "-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE")
endif()
CHECK_INCLUDE_FILES("time.h;sys/time.h" TIME_WITH_SYS_TIME)
SET(HAVE_MMALLOC 0)
endif()
+
if(WIN32) #THOSE FILES ARE FUNCTIONS ARE NOT DETECTED BUT THEY SHOULD...
set(HAVE_UCONTEXT_H 1)
set(HAVE_MAKECONTEXT 1)
if(enable_smpi)
include(FindGFortran)
+ #really checks for objdump for privatization
+ find_package(BinUtils QUIET)
SET(HAVE_SMPI 1)
+
+ if( NOT "${CMAKE_OBJDUMP}" MATCHES "CMAKE_OBJDUMP-NOTFOUND" AND HAVE_MMAP)
+ SET(HAVE_PRIVATIZATION 1)
+ else()
+ SET(HAVE_PRIVATIZATION 0)
+ endif()
endif()
#--------------------------------------------------------------------------------------------------
# This is needed for ucontext on MacOS X:
if(CMAKE_SYSTEM_NAME MATCHES "Darwin")
- add_definitions(-D_XOPEN_SOURCE=700)
+ add_definitions(-D_XOPEN_SOURCE=700 -D_DARWIN_C_SOURCE)
endif()
if(WIN32)
endif()
if(release)
- set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nRelease build")
+ set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER}\\nRelease build")
else()
- set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING}\\nDevelopment build")
+ set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER}\\nDevelopment build")
endif()
if(GIT_VERSION)
- set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} at commit ${GIT_VERSION}")
+ set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER} at commit ${GIT_VERSION}")
endif()
if(GIT_DATE)
- set(SIMGRID_VERSION_STRING "${SIMGRID_VERSION_STRING} (${GIT_DATE})")
+ set(SIMGRID_VERSION_BANNER "${SIMGRID_VERSION_BANNER} (${GIT_DATE})")
endif()
#--------------------------------------------------------------------------------------------------