summaryrefslogtreecommitdiffstats
path: root/src/Options.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-09-17 20:19:16 (GMT)
committerBrad King <brad.king@kitware.com>2015-09-18 20:16:43 (GMT)
commitc6562e546261eda66f540bbedcc66b1e414d8e2a (patch)
treee25f547dc8d201fd13ced13da8eb8d92b1f4ea7c /src/Options.h
parent48a1d8e17359a65977cd8b3a6d535ad26ceaf9ea (diff)
downloadCastXML-c6562e546261eda66f540bbedcc66b1e414d8e2a.zip
CastXML-c6562e546261eda66f540bbedcc66b1e414d8e2a.tar.gz
CastXML-c6562e546261eda66f540bbedcc66b1e414d8e2a.tar.bz2
RunClang: Detect C and C++ std level from --castxml-cc-<id>
If no -std= option is explicitly given then parse the __cplusplus or __STDC_VERSION__ preprocessor definition from the compiler output and add the corresponding -std= flag. For MSVC we need to map _MSC_VER to -std= ourselves because the compiler does not define __cplusplus to standard values and each version hard-codes its C++ standard level.
Diffstat (limited to 'src/Options.h')
-rw-r--r--src/Options.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Options.h b/src/Options.h
index 0047b58..34f5089 100644
--- a/src/Options.h
+++ b/src/Options.h
@@ -22,10 +22,12 @@
struct Options
{
- Options(): PPOnly(false), GccXml(false), HaveCC(false), HaveTarget(false) {}
+ Options(): PPOnly(false), GccXml(false), HaveCC(false),
+ HaveStd(false), HaveTarget(false) {}
bool PPOnly;
bool GccXml;
bool HaveCC;
+ bool HaveStd;
bool HaveTarget;
struct Include {
Include(std::string const& d, bool f = false):