Skip to content

Commit

Permalink
patch: fix: Do not use generator expression for "/utf-8" on Windows
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
  • Loading branch information
jjerphan committed Aug 12, 2024
1 parent 4e8dc53 commit 0b5781b
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
From f9761e6f86d095cd606a7981a581ab4eeac47555 Mon Sep 17 00:00:00 2001
From: Julien Jerphanion <git@jjerphan.xyz>
Date: Mon, 12 Aug 2024 14:52:38 +0200
Subject: [PATCH] fix: Do not use generator expression for "/utf-8" on Windows

See: https://github.com/facebook/folly/issues/2250

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
---
CMake/GenPkgConfig.cmake | 9 +++++++++
1 file changed, 9 insertions(+)

diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index 0e93175bd..b8875fbf1 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -105,6 +105,15 @@ function(gen_pkgconfig_vars)
)
endif()

+ # On Windows replace "$<$<COMPILE_LANGUAGE:CXX>:/utf-8>" with "/utf-8"
+ # See: https://github.com/facebook/folly/issues/1433
+ if(WIN32)
+ string(REPLACE
+ "$<$<COMPILE_LANGUAGE:CXX>:/utf-8>" "/utf-8"
+ cflags "${cflags}"
+ )
+ endif()
+
set("${var_prefix}_CFLAGS" "${cflags}" PARENT_SCOPE)
set("${var_prefix}_PRIVATE_LIBS" "${private_libs}" PARENT_SCOPE)
endfunction()
--
2.45.2

1 change: 1 addition & 0 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ source:
patches:
- 0001-Use-CMAKE_SYSTEM_PROCESSOR-instead-of-CMAKE_LIBRARY_.patch
- 0001-Add-missing-unistd-include.patch
- 0001-fix-Do-not-use-generator-expression-for-utf-8-on-Win.patch

build:
number: 1
Expand Down

0 comments on commit 0b5781b

Please sign in to comment.