Resolve "Easy switch for builds with debug info and production builds"
Closes #136 (closed)
Changes:
-
./build.sh
now checksDEBUG_BUILD
environment variable (e.g.$ DEBUG_BUILD=1 ./build.sh
). If this variable is set to"1"
,CFLAGS
andCXXFLAGS
both get set to-g -ggdb -O0
. Otherwise flags are set to-O3 -DNDEBUG=1
. - changed slightly the DATE build scripts -- just forward
CFLAGS
instead of setting them (?=
instead of:=
) - changed
./configure
for DaqDataDecoding: removed hardcoded-O2
inCXXFLAGS
, prepended it with$CXXFLAGS
- changes in
p348reco/Makefile
:- Backticks (
`...`
-- deferred expansion of shell instructions) inMakefile
were used to runcmake
. While inspecting the resultingCMAKE_CACHE
I found that these notation actually spoils CMake's commands. I changed these to$(shell ...)
to fix that. - Target
genfit-install
results in slightly different directory structure for Debian-like distros (e.g. Ubuntu) -- library suffix becomeslib/
instead oflib64/
. This is a well-known CMake gotcha -- once can clamp the suffix with-DCMAKE_INSTALL_LIBDIR=lib
which was added as well - Append install command for CMake-based packages with explicit
-DCMAKE_BUILD_TYPE
to follow its standard way of builds designations.
- Backticks (
- removed hardcoded
-O3
for COOOL
Contrary to what was initially proposed, it is better to name steering variable different then DEBUG=1
as the latter one is used by make
utility to enable echoing output (cf. DEBUG=1 make
).
Edited by Renat Dusaev