Bug#712056: RFS: scantailor [ITP] -- interactive post-processing tool for scanned document pages
Hi Daniel,
On Sun, 16 Jun 2013 01:16:30 Daniel Stender wrote:
> 3) buildflags
>
> But Scantailor gets compiled w/o any customization
That's because upstream drop/override given CXXFLAGS (which is a
bug). :)
I'm not experienced with cmake but perhaps first attempt to fix this
problem might look like the following patch:
--- a/cmake/SetDefaultGccFlags.cmake
+++ b/cmake/SetDefaultGccFlags.cmake
@@ -102,9 +102,9 @@
CACHE STRING "C flags for RelWithDebInfo builds." FORCE
)
SET(
CMAKE_CXX_FLAGS_RELWITHDEBINFO
- "-DNDEBUG -g -O2 ${visibility_cflags_}"
+ "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DNDEBUG -g -O2 ${visibility_cflags_}"
CACHE STRING "C++ flags for RelWithDebInfo builds." FORCE
)
SET(
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO ""
There are might be better ways to preserve flags and I'm not sure if I
did it properly. Also CFLAGS might need similar workaround (I didn't
check).
> Anyway, the custom linker flags got passed through!
Good. :)
> I've experimented around, e.g. dropping the build type switch, but couldn't got a clue why this
> isn't working that way, is it?
Build type is better to leave as "RELWITHDEBINFO". This might be
useful if you decide to provide -dbg package or just to (re-)build
with debugging info with command like
`DEB_BUILD_OPTIONS="nostrip" debuild -us -b`
> For recent changes, please cf.: http://anonscm.debian.org/gitweb/?p=collab-maint/scantailor.git
Sure, I'll have a look in few days (as soon as I have time). Hopefully
it will be ready for upload by then. ;)
> Mucht thanks also for the other comments!
No worries, you're very welcome. :)
Cheers,
Dmitry Smirnov
GPG key : 4096R/53968D1B
Reply to: