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 <[email protected]>
  • Loading branch information
jjerphan committed Aug 12, 2024
1 parent 4e8dc53 commit 4021d92
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
From 7e336ba269023fee32f1862e9efc41048b811499 Mon Sep 17 00:00:00 2001
From: Julien Jerphanion <[email protected]>
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 <[email protected]>
---
CMake/GenPkgConfig.cmake | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/CMake/GenPkgConfig.cmake b/CMake/GenPkgConfig.cmake
index 0e93175bd..3c21fb4a6 100644
--- a/CMake/GenPkgConfig.cmake
+++ b/CMake/GenPkgConfig.cmake
@@ -105,6 +105,14 @@ 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}"
+ )
+
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 4021d92

Please sign in to comment.