building everything with a set of specific preprocessor token(s)/definition(s)?

Boudhayan Gupta bgupta at kde.org
Sun Feb 14 16:49:56 UTC 2016


On 14 February 2016 at 22:00, René J.V. <rjvbertin at gmail.com> wrote:
> On Sunday February 14 2016 15:20:14 David Faure wrote:
>
>> export CXXFLAGS="-DMYDEFINE=1" before running cmake should do the trick.
>
> That's what I'm using ATM, but cmake has a nasty habit of not taking the user's full CXXFLAGS and/or adding its own stuff to the resulting CMAKE_CXX_COMPILER_FLAGS_XXX, depending on what build type you're using.
>
> There's also an interaction with the build system I'm targeting; not really relevant on here but it does make it less trivial to rely on settings passed through the environment.

Hence my idea of using CC/CXX rather than the *FLAGS env-vars.

-- Boudhayan Gupta


More information about the Kde-frameworks-devel mailing list