From 71c57152d964c959343243b6f5a569b525718299 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andreas=20Kl=C3=B6ckner?= Date: Tue, 14 May 2019 00:25:26 +0200 Subject: [PATCH] Force C++ mode in aksetup to avoid Clang error on -std=c++14 https://gitlab.tiker.net/inducer/pymetis/issues/1 --- aksetup_helper.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/aksetup_helper.py b/aksetup_helper.py index e86f4cd..c6ea671 100644 --- a/aksetup_helper.py +++ b/aksetup_helper.py @@ -941,7 +941,13 @@ class PybindBuildExtCommand(NumpyBuildExtCommand): opts = self.c_opts.get(ct, []) if ct in ['unix', 'mingw32']: opts.append('-DVERSION_INFO="%s"' % self.distribution.get_version()) + + # Force language to C++ to avoid Clang barking at us about an invalid flag for C. + # https://gitlab.tiker.net/inducer/pymetis/issues/1 + opts.extend(["-x", "c++"]) + opts.append(cpp_flag(self.compiler)) + if has_flag(self.compiler, '-fvisibility=hidden'): opts.append('-fvisibility=hidden') elif ct == 'msvc': -- GitLab