set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g3")
if (CMAKE_COMPILER_IS_GNUCC)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "5.0")
+ if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS "7.0")
message(FATAL_ERROR
- "SimGrid needs at least g++ version 5.0 to compile but you have ${CMAKE_CXX_COMPILER_VERSION}."
- "You need a sufficient support of c++14 to compile SimGrid.")
+ "SimGrid needs at least g++ version 7.0 to compile but you have ${CMAKE_CXX_COMPILER_VERSION}."
+ "You need a sufficient support of c++17 to compile SimGrid.")
endif()
endif()
## We need a decent support of the C++14 and C11 standards
-set(CMAKE_CXX_STANDARD 14)
+set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_C_STANDARD 11)
if(enable_ns3)
include(FindNS3)
if (SIMGRID_HAVE_NS3)
- if (NS3_VERSION VERSION_LESS "3.28")
- message(FATAL_ERROR "SimGrid needs at least ns-3.28. Please upgrade or disable that cmake option.")
+ if (NOT NS3_VERSION EQUAL "3-dev" AND NS3_VERSION VERSION_LESS "3.28")
+ message(FATAL_ERROR "SimGrid needs ns-3 in version 3.28 or higher. Please upgrade or disable that cmake option.")
endif()
set(SIMGRID_HAVE_NS3 1)
- foreach(lib core csma point-to-point internet network applications wifi)
- set(SIMGRID_DEP "${SIMGRID_DEP} -lns${NS3_VERSION}-${lib}${NS3_SUFFIX}")
- endforeach()
+ set(SIMGRID_DEP "${SIMGRID_DEP} ${NS3_LIBRARIES}")
else()
message(FATAL_ERROR "Cannot find ns-3. Please install it (apt-get install ns3 libns3-dev) or disable that cmake option")
endif()