summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-05-15 21:30:07 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-05-15 21:30:07 +0000
commit3d716e8490678f00f844dc4e74eb2695b46ef9b8 (patch)
tree2fa974791ed68a2a0f8b594e90f287926c04972b
parentadd 64bit build-x64.xml to trunk (diff)
downloadinkscape-3d716e8490678f00f844dc4e74eb2695b46ef9b8.tar.gz
inkscape-3d716e8490678f00f844dc4e74eb2695b46ef9b8.zip
add cxxflags attribute possibility for buildtool. fixes warnings for c-files (-Woverloaded-virtual)
(bzr r13382)
-rw-r--r--build-x64.xml8
-rw-r--r--build.xml7
-rw-r--r--buildtool.cpp14
3 files changed, 24 insertions, 5 deletions
diff --git a/build-x64.xml b/build-x64.xml
index 385347a5a..7f19db5b7 100644
--- a/build-x64.xml
+++ b/build-x64.xml
@@ -359,8 +359,7 @@
<file name="extension/param"/>
</excludeinc>
<flags>
- <!-- -std=gnu++0x -DCPP11 -Wno-unused-local-typedefs -->
- -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
+ -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
-Werror=return-type
<!-- - -> -Werror <!-- -->
<!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
@@ -374,6 +373,11 @@
-mms-bitfields
-fopenmp
</flags>
+ <cxxflags>
+ -std=gnu++0x -DCPP11
+ -Woverloaded-virtual
+ <!-- -Wno-unused-local-typedefs -->
+ </cxxflags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
diff --git a/build.xml b/build.xml
index ba07be7da..743151660 100644
--- a/build.xml
+++ b/build.xml
@@ -356,8 +356,7 @@
<file name="extension/param"/>
</excludeinc>
<flags>
- <!-- -std=gnu++0x -DCPP11 -Wno-unused-local-typedefs -->
- -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Woverloaded-virtual -Wswitch
+ -Wall -Wformat -Werror=format-security -Wextra -Wpointer-arith -Wcast-align -Wsign-compare -Wswitch
-Werror=return-type
<!-- - -> -Werror <!-- -->
<!-- A list of warnings that should not error *yet*, any help is welcome in fixing the code generating these warnings! -->
@@ -370,6 +369,10 @@
-mms-bitfields
-fopenmp
</flags>
+ <cxxflags>
+ <!-- -std=gnu++0x -DCPP11 -Wno-unused-local-typedefs -->
+ -Woverloaded-virtual
+ </cxxflags>
<defines>
-DVERSION=\"${version}\"
-DHAVE_CONFIG_H
diff --git a/buildtool.cpp b/buildtool.cpp
index 060c352da..a43bb0192 100644
--- a/buildtool.cpp
+++ b/buildtool.cpp
@@ -6918,7 +6918,9 @@ public:
String cxxCommand = parent.eval(cxxCommandOpt, "g++");
String source = parent.eval(sourceOpt, ".");
String dest = parent.eval(destOpt, ".");
- String flags = parent.eval(flagsOpt, "");
+ String ccflags = parent.eval(flagsOpt, "");
+ String cxxflags = parent.eval(cxxflagsOpt, "");
+ String flags = ccflags;
String defines = parent.eval(definesOpt, "");
String includes = parent.eval(includesOpt, "");
bool continueOnError = parent.evalBool(continueOnErrorOpt, true);
@@ -7027,7 +7029,10 @@ public:
String command = ccCommand;
if (sfx == "cpp" || sfx == "cxx" || sfx == "c++" ||
sfx == "cc" || sfx == "CC")
+ {
command = cxxCommand;
+ flags += " " + cxxflags;
+ }
//## Make paths
String destPath = dest;
@@ -7203,6 +7208,12 @@ public:
return false;
flagsOpt = strip(flagsOpt);
}
+ else if (tagName == "cxxflags")
+ {
+ if (!parent.getValue(child, cxxflagsOpt))
+ return false;
+ cxxflagsOpt = strip(cxxflagsOpt);
+ }
else if (tagName == "includes")
{
if (!parent.getValue(child, includesOpt))
@@ -7239,6 +7250,7 @@ protected:
String sourceOpt;
String destOpt;
String flagsOpt;
+ String cxxflagsOpt;
String definesOpt;
String includesOpt;
String continueOnErrorOpt;