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 7e336ba
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions CMake/GenPkgConfig.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,14 @@ function(gen_pkgconfig_vars)
)
endif()

# On Windows replace "$<$<COMPILE_LANGUAGE:CXX>:/utf-8>" with "/utf-8"
# See: https:/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()

0 comments on commit 7e336ba

Please sign in to comment.