diff --git a/CMakeLists.txt b/CMakeLists.txt index a63993e7..22e79366 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -285,7 +285,9 @@ set(BUILD_SHARED_LIBS OFF) if (TCNN_EXTERNAL_FMT) list(APPEND TCNN_LIBRARIES "${TCNN_EXTERNAL_FMT}") + list(APPEND TCNN_DEFINITIONS -DFMT_UNICODE=0) else() + set(FMT_UNICODE OFF CACHE BOOL " " FORCE) add_subdirectory("dependencies/fmt") list(APPEND TCNN_LIBRARIES fmt) list(APPEND TCNN_INCLUDES "dependencies/fmt/include") diff --git a/dependencies/fmt b/dependencies/fmt index b0c8263c..add164f6 160000 --- a/dependencies/fmt +++ b/dependencies/fmt @@ -1 +1 @@ -Subproject commit b0c8263cb26ea178d3a5df1b984e1a61ef578950 +Subproject commit add164f6b3f5deb800443b87ba812fb19ad7cd5b diff --git a/include/tiny-cuda-nn/common_host.h b/include/tiny-cuda-nn/common_host.h index c0858bed..de017c6b 100644 --- a/include/tiny-cuda-nn/common_host.h +++ b/include/tiny-cuda-nn/common_host.h @@ -56,7 +56,7 @@ void set_log_callback(const std::function template void log(LogSeverity severity, const std::string& msg, Ts&&... args) { - log_callback()(severity, fmt::format(msg, std::forward(args)...)); + log_callback()(severity, fmt::format(fmt::runtime(msg), std::forward(args)...)); } template void log_info(const std::string& msg, Ts&&... args) { log(LogSeverity::Info, msg, std::forward(args)...); } @@ -304,7 +304,7 @@ std::string dfmt(uint32_t indent, const std::string& format, Ts&&... args) { } } - return fmt::format(join(lines, "\n"), std::forward(args)...); + return fmt::format(fmt::runtime(join(lines, "\n")), std::forward(args)...); } std::string to_lower(std::string str);