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
Reduces the amount of build env leaked in the binaries (see #39)
[simgrid.git]
/
tools
/
cmake
/
GCCFlags.cmake
diff --git
a/tools/cmake/GCCFlags.cmake
b/tools/cmake/GCCFlags.cmake
index
a85f6cd
..
a6ec7a9
100644
(file)
--- a/
tools/cmake/GCCFlags.cmake
+++ b/
tools/cmake/GCCFlags.cmake
@@
-79,6
+79,11
@@
if(enable_compile_optimizations AND CMAKE_COMPILER_IS_GNUCC
set(optCFLAGS "${optCFLAGS} -finline-functions ")
endif()
set(optCFLAGS "${optCFLAGS} -finline-functions ")
endif()
+# Do not leak the current directory into the binaries
+if(CMAKE_COMPILER_IS_GNUCC)
+ set(optCFLAGS "${optCFLAGS} -fdebug-prefix-map=${CMAKE_SOURCE_DIR}=.")
+endif()
+
# Configure LTO
# NOTE, cmake 3.0 has a INTERPROCEDURAL_OPTIMIZATION target
# property for this (http://www.cmake.org/cmake/help/v3.0/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html)
# Configure LTO
# NOTE, cmake 3.0 has a INTERPROCEDURAL_OPTIMIZATION target
# property for this (http://www.cmake.org/cmake/help/v3.0/prop_tgt/INTERPROCEDURAL_OPTIMIZATION.html)