Skip to content

Commit

Permalink
[folly] apply fmt workaround for all cmake versions
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Sep 15, 2024
1 parent 4fd0686 commit cfb9973
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ports/folly/fix-fmt-patch-for-old-cmake.patch
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index 0e93175bd..2f3e1beee 100644
index 0e93175bd..9de854022 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -103,6 +103,11 @@ function(gen_pkgconfig_vars)
"<COMPILE_LANG_AND_ID:CUDA,NVIDIA>" "<COMPILE_LANGUAGE:CUDA>"
cflags "${cflags}"
)
+
+ # patch for fmt's generator expression on older CMake
+ if (MSVC)
+ string(REPLACE "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>" "/utf-8" cflags "${cflags}")
+ endif()
+ endif()
+ # patch for fmt's generator expression on older CMake
+ if (MSVC)
+ string(REPLACE "$<$<AND:$<COMPILE_LANGUAGE:CXX>,$<CXX_COMPILER_ID:MSVC>>:/utf-8>" "/utf-8" cflags "${cflags}")
endif()

set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
Expand Down
2 changes: 1 addition & 1 deletion versions/f-/folly.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"versions": [
{
"git-tree": "552a10d6c84c4bb5c1fc4c8b548d8618ff6daf9d",
"git-tree": "4114c18119dbf036ccdaea4280c0d4f12c83d191",
"version-string": "2024.09.09.00",
"port-version": 1
},
Expand Down

0 comments on commit cfb9973

Please sign in to comment.