darktable-org/darktable — pull request #503 by LebedevRI (2014-03-21 18:33:04+00:00)
Title: Rework src/CMakeLists.txt: set dev. flags after building bundled libs

PLEASE REVIEW CAREFULLY!

Fact: currently, if we set CFLAGS to -Werror, libraw will fail ()
Problem: we need to somehow be able to set CFLAGS to -Werror without affecting our external "bundled" sources.

Why? They are external dependencies, even if we will fix all issues [shown by -Werror] in them, we would need to upstream them, or updating them will be extremely difficult.

Solution:
1. set base cflags - optimisation only
2. build all bundled external source - src/external/*
3. append our development CFLAGS (-Werror ...)
4. build our sources

Additional benefit: -Werror is now can be enabled for clang too :)