Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to spdlog 1.12 and fmt 10.1.1 #473

Merged
merged 3 commits into from
Nov 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 0 additions & 13 deletions rapids-cmake/cpm/patches/fmt/no_debug_warnings.diff

This file was deleted.

41 changes: 41 additions & 0 deletions rapids-cmake/cpm/patches/spdlog/nvcc_constexpr_fix.diff
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
diff --git a/include/spdlog/common.h b/include/spdlog/common.h
index 0a262eb2..29ef2324 100644
--- a/include/spdlog/common.h
+++ b/include/spdlog/common.h
@@ -62,17 +62,26 @@

// visual studio up to 2013 does not support noexcept nor constexpr
#if defined(_MSC_VER) && (_MSC_VER < 1900)
-# define SPDLOG_NOEXCEPT _NOEXCEPT
-# define SPDLOG_CONSTEXPR
-# define SPDLOG_CONSTEXPR_FUNC inline
+ #define SPDLOG_NOEXCEPT _NOEXCEPT
+ #define SPDLOG_CONSTEXPR
#else
-# define SPDLOG_NOEXCEPT noexcept
-# define SPDLOG_CONSTEXPR constexpr
-# if __cplusplus >= 201402L
-# define SPDLOG_CONSTEXPR_FUNC constexpr
-# else
-# define SPDLOG_CONSTEXPR_FUNC inline
-# endif
+ #define SPDLOG_NOEXCEPT noexcept
+ #define SPDLOG_CONSTEXPR constexpr
+#endif
+
+// If building with std::format, can just use constexpr, otherwise if building with fmt
+// SPDLOG_CONSTEXPR_FUNC needs to be set the same as FMT_CONSTEXPR to avoid situations where
+// a constexpr function in spdlog could end up calling a non-constexpr function in fmt
+// depending on the compiler
+// If fmt determines it can't use constexpr, we should inline the function instead
+#ifdef SPDLOG_USE_STD_FORMAT
+ #define SPDLOG_CONSTEXPR_FUNC constexpr
+#else // Being built with fmt
+ #if FMT_USE_CONSTEXPR
+ #define SPDLOG_CONSTEXPR_FUNC FMT_CONSTEXPR
+ #else
+ #define SPDLOG_CONSTEXPR_FUNC inline
+ #endif
#endif

#if defined(__GNUC__) || defined(__clang__)
22 changes: 11 additions & 11 deletions rapids-cmake/cpm/versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,9 @@
"git_tag" : "7c76a124df0c2cd3fd66e3e080b9470a3b4707c6"
},
"fmt" : {
"version" : "9.1.0",
"version" : "10.1.1",
"git_url" : "https:/fmtlib/fmt.git",
"git_tag" : "${version}",
"patches" : [
{
"file" : "fmt/no_debug_warnings.diff",
"issue" : "No warnings during debug builds [https:/fmtlib/fmt/issues/3351]",
"fixed_in" : "10.0"
}
]
"git_tag" : "${version}"
},
"GTest" : {
"version" : "1.13.0",
Expand Down Expand Up @@ -76,9 +69,16 @@
"git_tag" : "branch-${version}"
},
"spdlog" : {
"version" : "1.11.0",
"version" : "1.12.0",
"git_url" : "https:/gabime/spdlog.git",
"git_tag" : "v${version}"
"git_tag" : "v${version}",
"patches" : [
{
"file" : "spdlog/nvcc_constexpr_fix.diff",
"issue" : "Fix constexpr mismatch between spdlog and fmt [https:/gabime/spdlog/issues/2856]",
"fixed_in" : "1.13"
}
]
},
"Thrust" : {
"version" : "1.17.2",
Expand Down