I am building deb
package from c++
project that uses CMake. Package that I build works fine, but binary itself is compiled using various options that override flags set in CMakeLists.txt
, e.g. flags used for compilation are -g -O2
instead of -Os
.
I know that I can override these flags in debian/rules
files via DEB_flag_MAINT_opt
, but I don't want to repeate flags from CMakeLists.txt
, I want them to be defined in single place. Is there some way to prevent debuild
(this is what I use, it probably uses dh
or something else under the hood, I can't make heads or tails of Debian's build tools, sorry) from overriding these (and other) flags? While I understand why unification of compile flags is good, I find it absolutely horrendous that it is this hard to prevent flags replacement.