X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/7da57caf7dc9f4515aa6eb8275dfcb054de51df7..12e502742be678b40d9aa89db6abff76b36e62f8:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index bb459f9507..f8fdcbca02 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -92,8 +92,8 @@ endif() set(SIMGRID_VERSION_MAJOR "3") set(SIMGRID_VERSION_MINOR "22") -set(SIMGRID_VERSION_PATCH "0") -# set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1) +set(SIMGRID_VERSION_PATCH "90") +set(SIMGRID_VERSION_EXTRA "-DEVEL") # Extra words to add to version string (e.g. -rc1) set(SIMGRID_VERSION_DATE "2019") # Year for copyright information @@ -253,27 +253,40 @@ endif() # Usable components: https://www.boost.org/doc/libs/1_65_1/doc/html/stacktrace/configuration_and_build.html set(_Boost_STACKTRACE_HEADERS "boost/stacktrace.hpp") set(_Boost_STACKTRACE_BACKTRACE_HEADERS "boost/stacktrace.hpp") +set(_Boost_STACKTRACE_ADDR2LINE_HEADERS "boost/stacktrace.hpp") -find_package(Boost 1.59 COMPONENTS context stacktrace_backtrace) -set(Boost_FOUND 1) # These components are optionals -message(STATUS "Mandatory components found. SimGrid is compilable.") -message(STATUS "Looking for optional Boost components:") - -if (Boost_STACKTRACE_BACKTRACE_FOUND) - message (STATUS " stacktrace: found. Activating human-readable stack traces.") - set(HAVE_BOOST_STACKTRACE 1) - set(SIMGRID_DEP "${SIMGRID_DEP} -lboost_stacktrace_backtrace") +if(minimal_java) # When we want a minimal jarfile, don't even search for boost optional components + message(STATUS "Don't even look for boost optional components, as we build a minimal jar file") else() - message (STATUS " stacktrace: MISSING. Install libboost-stacktrace-dev to display the stacktraces.") - set(HAVE_BOOST_STACKTRACE 0) -endif() + find_package(Boost 1.59 COMPONENTS context stacktrace_backtrace stacktrace_addr2line) + set(Boost_FOUND 1) # These components are optionals + message(STATUS "Mandatory components found. SimGrid is compilable.") + message(STATUS "Looking for optional Boost components:") + + if (Boost_STACKTRACE_BACKTRACE_FOUND) + message (STATUS " stacktrace: found the fast 'backtrace' implementation. Activating human-readable stack traces.") + set(HAVE_BOOST_STACKTRACE_BACKTRACE 1) + set(SIMGRID_DEP "${SIMGRID_DEP} -lboost_stacktrace_backtrace") + else() + set(HAVE_BOOST_STACKTRACE_BACKTRACE 0) + + if (Boost_STACKTRACE_ADDR2LINE_FOUND) + message (STATUS " stacktrace: found the slow 'addr2line' implementation. Activating human-readable stack traces.") + set(HAVE_BOOST_STACKTRACE_ADDR2LINE 1) + set(SIMGRID_DEP "${SIMGRID_DEP} -lboost_stacktrace_addr2line") + else() + message (STATUS " stacktrace: MISSING. Install libboost-stacktrace-dev to display the stacktraces.") + set(HAVE_BOOST_STACKTRACE_ADDR2LINE 0) + endif() + endif() -if(Boost_CONTEXT_FOUND) - message (STATUS " context: found. Activating Boost contexts.") - set(HAVE_BOOST_CONTEXTS 1) -else() - message (STATUS " context: MISSING. Install libboost-context-dev for this optional feature.") - set(HAVE_BOOST_CONTEXTS 0) + if(Boost_CONTEXT_FOUND) + message (STATUS " context: found. Activating Boost contexts.") + set(HAVE_BOOST_CONTEXTS 1) + else() + message (STATUS " context: MISSING. Install libboost-context-dev for this optional feature.") + set(HAVE_BOOST_CONTEXTS 0) + endif() endif() @@ -352,12 +365,19 @@ else() SET(SIMGRID_HAVE_MALLOCATOR 0) endif() -include(FindLibunwind) -if(HAVE_LIBUNWIND) - SET(SIMGRID_DEP "${SIMGRID_DEP} ${LIBUNWIND_LIBRARIES}") -else() +if (minimal_java) + message(STATUS "Don't look for libunwind as we build a minimal jar file.") if(enable_model-checking) - message(FATAL_ERROR "Please install libunwind-dev libdw-dev libelf-dev libevent-dev if you want to compile the SimGrid model checker.") + message(FATAL_ERROR "You cannot enable model-checking and minimal_java at the same time.") + endif() +else() + include(FindLibunwind) + if(HAVE_LIBUNWIND) + SET(SIMGRID_DEP "${SIMGRID_DEP} ${LIBUNWIND_LIBRARIES}") + else() + if(enable_model-checking) + message(FATAL_ERROR "Please install libunwind-dev libdw-dev libelf-dev libevent-dev if you want to compile the SimGrid model checker.") + endif() endif() endif() @@ -385,7 +405,7 @@ endif() if(enable_smpi) SET(HAVE_SMPI 1) - if("${CMAKE_SYSTEM}" MATCHES "Darwin|FreeBSD|Linux") + if("${CMAKE_SYSTEM}" MATCHES "Darwin|FreeBSD|Linux|SunOS") SET(HAVE_PRIVATIZATION 1) else() message (STATUS "Warning: no support for SMPI automatic privatization on this platform") @@ -787,7 +807,10 @@ endif() if(enable_python) if(pybind11_FOUND) message(STATUS "Found pybind11, with C++14.") - pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp) + if(NOT enable_lto) + set(pybind11_options NO_EXTRAS) + endif() + pybind11_add_module(python-bindings src/bindings/python/simgrid_python.cpp ${pybind11_options}) target_compile_features(python-bindings PRIVATE cxx_std_14) target_link_libraries(python-bindings PUBLIC simgrid) set_target_properties(python-bindings PROPERTIES