Skip to content

Commit

Permalink
Support fmt use in debug builds (#456)
Browse files Browse the repository at this point in the history
Fixes #454

Backport of an upstream patch (fmtlib/fmt#3352) to our version of fmt 9.1

Authors:
  - Robert Maynard (https://github.com/robertmaynard)

Approvers:
  - Vyas Ramasubramani (https://github.com/vyasr)

URL: #456
  • Loading branch information
robertmaynard authored Sep 5, 2023
1 parent 87696af commit 9a2cfe8
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
13 changes: 13 additions & 0 deletions rapids-cmake/cpm/patches/fmt/no_debug_warnings.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/include/fmt/core.h b/include/fmt/core.h
index f6a37af..ffabe63 100644
--- a/include/fmt/core.h
+++ b/include/fmt/core.h
@@ -286,7 +286,7 @@

// Enable minimal optimizations for more compact code in debug mode.
FMT_GCC_PRAGMA("GCC push_options")
-#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER)
+#if !defined(__OPTIMIZE__) && !defined(__NVCOMPILER) && !defined(__LCC__) && !defined(__CUDACC__)
FMT_GCC_PRAGMA("GCC optimize(\"Og\")")
#endif

9 changes: 8 additions & 1 deletion rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,14 @@
"fmt" : {
"version" : "9.1.0",
"git_url" : "https://github.com/fmtlib/fmt.git",
"git_tag" : "${version}"
"git_tag" : "${version}",
"patches" : [
{
"file" : "fmt/no_debug_warnings.diff",
"issue" : "No warnings during debug builds [https://github.com/fmtlib/fmt/issues/3351]",
"fixed_in" : "10.0"
}
]
},
"GTest" : {
"version" : "1.13.0",
Expand Down

0 comments on commit 9a2cfe8

Please sign in to comment.