Skip to content

Commit

Permalink
Treat cuda includes as system includes (#26306)
Browse files Browse the repository at this point in the history
Fixes an issue where warnings in cuda headers would cause the build to
fail. By treating those headers as system includes, we can ignore those
warnings.

Note: on some systems, there are cuda headers that come from the cray
programming environment, which this PR does not handle.

[Reviewed by @riftEmber]
  • Loading branch information
jabraham17 authored Nov 22, 2024
2 parents e027449 + 0d76ef1 commit 484563e
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion util/chplenv/chpl_gpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,8 @@ def get_runtime_compile_args():
# If compiling for GPU locales, add CUDA runtime headers to include path
bundled.append("-I" + os.path.join(incl, "gpu", gpu_type))
if gpu_type == "nvidia":
system.append("-I" + os.path.join(sdk_path, "include"))
# treat the CUDA SDK as a system include
system.append("-idirafter" + os.path.join(sdk_path, "include"))

# workaround an issue with __float128 not being supported by clang in device code
system.append("-D__STRICT_ANSI__=1")
Expand Down

0 comments on commit 484563e

Please sign in to comment.