summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-02-14 11:40:24 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-02-14 11:50:12 +0100
commitf7ec0b0ac40045450bd86b73ca59b32a15bc8346 (patch)
tree9332a54dfd048ac9afff3b15cda4720f6342a5cf /bin
parenteaf3c9e5d1090ebadecccf4e20b6b1f7fa53af26 (diff)
VisualStudioIntegrationGenerator: put CXXFLAGS to AdditionalOptions
Adding AdditionalOptions to nmake project settings allows IntelliSense to know about used compiler switches; specifically, passing std switch (currently -std:c++17) defines _MSVC_LANG macro [1] to proper value to avoid false IntelliSense errors (e.g., for string_view). [1] https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros Change-Id: I90309e6bf2a87257a0c81b1406e678af962eb587 Reviewed-on: https://gerrit.libreoffice.org/67805 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'bin')
-rwxr-xr-xbin/gbuild-to-ide3
1 files changed, 3 insertions, 0 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide
index 9ed964339c7f..1365c548c218 100755
--- a/bin/gbuild-to-ide
+++ b/bin/gbuild-to-ide
@@ -1031,6 +1031,7 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
if not os.path.exists(folder):
os.makedirs(folder)
project_guid = str(uuid.uuid4()).upper()
+ cxxflags = ' '.join(target.cxxflags)
ns = 'http://schemas.microsoft.com/developer/msbuild/2003'
ET.register_namespace('', ns)
proj_node = ET.Element('{%s}Project' % ns, DefaultTargets='Build', ToolsVersion='4.0')
@@ -1100,6 +1101,8 @@ class VisualStudioIntegrationGenerator(IdeIntegrationGenerator):
nmake_defs_node.text = ';'.join(self.defs_list(target.defs) + ['$(NMakePreprocessorDefinitions)'])
include_path_node = ET.SubElement(conf_node, '{%s}IncludePath' % ns)
include_path_node.text = include_path_node_text
+ additional_options_node = ET.SubElement(conf_node, '{%s}AdditionalOptions' % ns)
+ additional_options_node.text = cxxflags
ET.SubElement(proj_node, '{%s}ItemDefinitionGroup' % ns)