Skip to content

Commit

Permalink
try patching fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jameslamb committed Sep 17, 2024
1 parent be0c3d1 commit d7671a3
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
20 changes: 20 additions & 0 deletions rapids-cmake/cpm/patches/fix_11_0_2_unreachable_loop.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
diff --git a/include/fmt/base.h b/include/fmt/base.h
index 62764942..b61c2776 100644
--- a/include/fmt/base.h
+++ b/include/fmt/base.h
@@ -464,6 +464,7 @@ template <typename Char> FMT_CONSTEXPR auto length(const Char* s) -> size_t {
return len;
}

+#pragma nv_diag_suppress 128
template <typename Char>
FMT_CONSTEXPR auto compare(const Char* s1, const Char* s2, std::size_t n)
-> int {
@@ -474,6 +475,7 @@ FMT_CONSTEXPR auto compare(const Char* s1, const Char* s2, std::size_t n)
}
return 0;
}
+#pragma nv_diag_default 128

namespace adl {
using namespace std;
8 changes: 7 additions & 1 deletion rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,13 @@
"fmt": {
"version": "11.0.2",
"git_url": "https://github.com/fmtlib/fmt.git",
"git_tag": "${version}"
"git_tag": "${version}",
"patches": [
{
"file": "fmt/fix_11_0_2_unreachable_loop.diff",
"issue": "fmt 11.0.2 produces a warning about an unreachable loop when compiled with nvcc"
}
]
},
"GTest": {
"version": "1.13.0",
Expand Down

0 comments on commit d7671a3

Please sign in to comment.