Fix compile_cuda for g++-7
@@ -66,6 +66,16 @@ def main():
for prefix in skip_prefix_list:
cflags = [i for i in cflags if not i.startswith(prefix)]
+ if not is_clang(command):
+ def good(arg):
+ if arg.startswith('--target='):
+ return False
+ if arg in ('-Wno-exceptions',
+ '-Wno-inconsistent-missing-override'):
+ return False
+ return True
+ cflags = filter(good, cflags)
+
cpp_args = []
compiler_args = []
@@ -103,6 +113,7 @@ def main():
compiler_args.append(arg)
command += cpp_args
+ if compiler_args:
command += ['--compiler-options', ','.join(compiler_args)]
if dump_args:
