diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-11 09:14:09 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2016-04-11 08:50:49 +0000 |
commit | 363444aa6e6a2a0a81d6a82c4a4d6417291f87a2 (patch) | |
tree | 7704507e0af0265a7ddb980aa4b4cad3efebf00f /bin/gbuild-to-ide | |
parent | b15ee18a5e81b7c3908fb5343930638cac4918d9 (diff) |
vim-ide-integration: clang does not always like gnu++1y that much
And gives the error:
include/c++/4.8/cstdio:120:11: error: no member named 'gets' in the global namespace
when it's build against libstdc++.
Commit 9e6221f114ba4422caa79f38ee0a20fb8a8931cd (clang does not like gnu++11
that much, use c++11 instead, 2014-09-06) added support for invoking clang for
IDE purposes even in a tree configured for gcc. Extend this in case configure
sets -std=gnu++1y for gcc as well.
Change-Id: Ib767ef8f30bd6eb9ac825a1521184041f1269d93
Reviewed-on: https://gerrit.libreoffice.org/23983
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'bin/gbuild-to-ide')
-rwxr-xr-x | bin/gbuild-to-ide | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bin/gbuild-to-ide b/bin/gbuild-to-ide index f6835bd53a0e..ba683a96fec3 100755 --- a/bin/gbuild-to-ide +++ b/bin/gbuild-to-ide @@ -464,7 +464,10 @@ class VimIntegrationGenerator(IdeIntegrationGenerator): command += cxxflag command += ' -c ' command += file - return command.replace('-std=gnu++11', '-std=c++11') + # Help clang when the tree is configured for gcc. + for gnu in ('-std=gnu++11', '-std=gnu++1y'): + command = command.replace(gnu, '-std=c++11') + return command class KdevelopIntegrationGenerator(IdeIntegrationGenerator): |