summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-27 13:58:14 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-27 13:58:14 (GMT)
commita67cef4aee0ce6d0ad5eba7631dd5908e12a5353 (patch)
treeb9a137d6c757f583b47ef9326091c987e9a30d7e /src
parent204ecd2e2b382df3fe8014e191f820d568a8048c (diff)
downloadCastXML-a67cef4aee0ce6d0ad5eba7631dd5908e12a5353.zip
CastXML-a67cef4aee0ce6d0ad5eba7631dd5908e12a5353.tar.gz
CastXML-a67cef4aee0ce6d0ad5eba7631dd5908e12a5353.tar.bz2
Detect: Add MSVC target triple component
When `_MSC_VER` is among compiler predefines, the target ABI is MSVC.
Diffstat (limited to 'src')
-rw-r--r--src/Detect.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Detect.cxx b/src/Detect.cxx
index ec3c6ce..fa88499 100644
--- a/src/Detect.cxx
+++ b/src/Detect.cxx
@@ -96,6 +96,9 @@ static void setTriple(Options& opts)
triple.setVendorName("pc");
triple.setOSName("windows");
}
+ if (pd.find("#define _MSC_VER ") != pd.npos) {
+ triple.setEnvironmentName("msvc");
+ }
if (pd.find("#define __MINGW32__ 1") != pd.npos) {
triple.setEnvironmentName("gnu");
}