summaryrefslogtreecommitdiffstats
path: root/buildtool.cpp
diff options
context:
space:
mode:
authorJohan B. C. Engelen <jbc.engelen@swissonline.ch>2014-05-15 21:28:16 +0000
committerJohan B. C. Engelen <j.b.c.engelen@alumnus.utwente.nl>2014-05-15 21:28:16 +0000
commit72997d43349fabcf67d19b3d28ae72fb1b642dfb (patch)
treef73ea621035dd625dbc0f4017ef820b1c56bce17 /buildtool.cpp
parentmake windows filedialog's code more portable for different mingw versions (fa... (diff)
downloadinkscape-72997d43349fabcf67d19b3d28ae72fb1b642dfb.tar.gz
inkscape-72997d43349fabcf67d19b3d28ae72fb1b642dfb.zip
add cxxflags attribute possibility for buildtool. fixes warnings for c-files (-Woverloaded-virtual)
(bzr r13341.1.27)
Diffstat (limited to 'buildtool.cpp')
-rw-r--r--buildtool.cpp14
1 files changed, 13 insertions, 1 deletions
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;