[PATCH] Use compilation flags.
thiago at macieira.org
Thu Aug 21 09:42:59 PDT 2014
On Thursday 21 August 2014 10:16:17 Salvo 'LtWorf' Tomaselli wrote:
> This makes qmake aware of CFLAGS, CXXFLAGS, LDFLAGS, CPPFLAGS.
> This is helpful to easily add flags to the compilation (such as
> hardening flags).
> Signed-off-by: Salvo 'LtWorf' Tomaselli <tiposchi at tiscali.it>
> subsurface.pro | 5 +++++
> 1 file changed, 5 insertions(+)
> diff --git a/subsurface.pro b/subsurface.pro
> index 1d891a1..b6c81f6 100644
> --- a/subsurface.pro
> +++ b/subsurface.pro
> @@ -340,3 +340,8 @@ include(subsurface-install.pri)
> # to build debuggable binaries on Windows, you need something like this
> #QMAKE_CFLAGS_RELEASE=$$QMAKE_CFLAGS_DEBUG -O0 -g
> #QMAKE_CXXFLAGS_RELEASE=$$QMAKE_CXXFLAGS_DEBUG -O0 -g
> +QMAKE_CXXFLAGS += $$(CXXFLAGS)
> +QMAKE_CFLAGS += $$(CFLAGS)
> +QMAKE_LFLAGS += $$(LDFLAGS)
> +QMAKE_CPPFLAGS += $$(CPPFLAGS)
Have you tested this? I'm trying here and the generated Makefile is identical
to the one without this patch.
And in any case, I don't think this would work. If you got your way, qmake
CFLAGS = -pipe .... $(CFLAGS) $(DEFINES)
Which isn't allowed:
Makefile:16: *** Recursive variable 'CFLAGS' references itself (eventually).
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Software Architect - Intel Open Source Technology Center
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
More information about the subsurface