project(SimGrid C CXX)
+## This is a better way to set the flags:
+if(NOT CMAKE_BUILD_TYPE)
+ set(CMAKE_BUILD_TYPE Release)
+endif()
+set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS} -O0 ${CXXFLAGS}")
+set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS} ${CXXFLAGS}")
+
## Save compiler flags preset with environment variables CFLAGS or CXXFLAGS;
## they will used within smpicc, smpicxx.
## Do it early so that we get their genuine values. The same will be done later for Fortran.
endif()
get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
-if (enable_model-checking AND (NOT ("cxx_std_14" IN_LIST known_features)))
- message(FATAL_ERROR "Model-checking requires C++14. Please upgrade your compiler")
-endif()
if(enable_smpi)
SET(HAVE_SMPI 1)
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