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
Add '-O0' flag for: cmake -DCMAKE_BUILD_TYPE=Debug
[simgrid.git]
/
CMakeLists.txt
diff --git
a/CMakeLists.txt
b/CMakeLists.txt
index 94a78f409f24b8ca122009b9e60fcf6a0654abdc..907afc08c450ec79c48e608eaf800cc50b0ae3f7 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.