A
lgorithmique
N
umérique
D
istribuée
Public GIT Repository
projects
/
simgrid.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a doc error about actors (Tutorial_algorithms)
[simgrid.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index
2ed6e4c
..
907afc0
100644
(file)
--- a/
CMakeLists.txt
+++ b/
CMakeLists.txt
@@
-4,6
+4,13
@@
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_HOME_DIRECTORY}/tools/cmake/M
project(SimGrid C CXX)
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.
## 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.
@@
-411,6
+418,8
@@
if (enable_model-checking AND enable_ns3)
message(FATAL_ERROR "Cannot activate both model-checking and ns-3 bindings: ns-3 pull too much dependencies for the MC to work")
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(enable_smpi)
SET(HAVE_SMPI 1)
if(NOT WIN32)
@@
-773,12
+782,18
@@
if(enable_java)
include(${CMAKE_HOME_DIRECTORY}/tools/cmake/Java.cmake)
endif()
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)
# 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
if("cxx_std_14" IN_LIST known_features)
if(EXISTS ${CMAKE_HOME_DIRECTORY}/pybind11) # Try to use a local copy of pybind11, if any