Skip to content

Commit

Permalink
fix: Do not use generator expression for "/utf-8" on Windows
Browse files Browse the repository at this point in the history
See: facebook#2250

Signed-off-by: Julien Jerphanion <[email protected]>
  • Loading branch information
jjerphan committed Aug 12, 2024
1 parent c5aa5c4 commit f9761e6
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CMake/GenPkgConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

0 comments on commit f9761e6

Please sign in to comment.