if(APPLE)
message(FATAL_ERROR "Boost libraries not found. Try to install them with 'sudo fink install boost1.53.nopython' (check the exact name with 'fink list boost') or 'sudo brew install boost'")
else()
- if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.11)
- find_package(Boost 1.48) #try again with just boost, as old cmake may fail.
- endif()
+ find_package(Boost 1.48) #try without optional libraries
if(NOT Boost_FOUND)
message(FATAL_ERROR "Boost libraries not found. Install libboost-dev (>= 1.48.0).")
+ else()
+ include_directories(${Boost_INCLUDE_DIRS})
+ message(STATUS "Mandatory components found. SimGrid is compilable.")
endif()
endif()
endif()
message(FATAL_ERROR "Cannot activate both model-checking and ns-3 bindings: ns-3 pull too much dependencies for the MC to work")
endif()
+get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
+
if(enable_smpi)
SET(HAVE_SMPI 1)
if(NOT WIN32)
if(NS3_LIBRARY_PATH)
set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${NS3_LIBRARY_PATH}")
endif()
-set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"")
+set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"")
set(SMPIMAIN ${libdir}/simgrid/smpimain)
set(SMPIREPLAYMAIN ${libdir}/simgrid/smpireplaymain)
if(NS3_LIBRARY_PATH)
set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${NS3_LIBRARY_PATH}")
endif()
-set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"")
+set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"")
set(SMPIMAIN ${CMAKE_BINARY_DIR}/lib/simgrid/smpimain)
set(SMPIREPLAYMAIN ${CMAKE_BINARY_DIR}/lib/simgrid/smpireplaymain)
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Java.cmake)
endif()
+if (enable_model-checking AND (NOT ("cxx_std_14" IN_LIST known_features)))
+ message(WARNING "C++14 not found. The model-checker will use a slow hash function. You should upgrade your compiler")
+ set(SG_HAVE_CPP14 0)
+else()
+ set(SG_HAVE_CPP14 1)
+ set_property(TARGET simgrid PROPERTY CXX_STANDARD 14)
+endif()
+
# Python binding (with pybind11)
################
# Our usage of pybind11::overload_cast mandates C++14
if((NOT DEFINED enable_python) OR enable_python)
- get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
-
if("cxx_std_14" IN_LIST known_features)
if(EXISTS ${CMAKE_HOME_DIRECTORY}/pybind11) # Try to use a local copy of pybind11, if any