Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GenPkgConfig.cmake: file(GENERATE) failed with $<COMPILE_LANGUAGE> in fmt 11.0.0 MSVC #2250

Open
Od0VxibTqto6Hs opened this issue Jul 8, 2024 · 0 comments

Comments

@Od0VxibTqto6Hs
Copy link

fmt 11.0.0 added the CMake generator expression <$<COMPILE_LANGUAGE:CXX>:/utf-8> for MSVC in fmtlib/fmt#3995, which will cause folly to fail when generating pkgconfig file in CMakeLists.txt#L497-L502.

Problem

For fmt, it added $<$<COMPILE_LANGUAGE:CXX>:/utf-8> in 11.0.0/CMakeLists.txt#L358-L362 for MSVC AND FMT_UNICODE.

If folly upgrade dependency fmt to 11.0.0, will generate libfolly.pc.gen with Cflags: -I${includedir} $<$<COMPILE_LANGUAGE:CXX>:/utf-8> in CMakeLists.txt#L497-L502.

But file(GENERATE) context does not support $<COMPILE_LANGUAGE:...>, will failed with Evaluation file to be written multiple times with different content. See CMake #26110.

Maybe it could fixed by add conditional processing like #1433.

jjerphan added a commit to jjerphan/folly that referenced this issue Aug 12, 2024
See: facebook#2250

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
jjerphan added a commit to jjerphan/folly that referenced this issue Aug 12, 2024
See: facebook#2250

Signed-off-by: Julien Jerphanion <git@jjerphan.xyz>
facebook-github-bot pushed a commit that referenced this issue Sep 30, 2024
Summary:
Workaround for #2250.

Ideally, the code should support the generator expression, but this workaround fixes the problem for fmt.

Also, see fmtlib/fmt#4159 and microsoft/vcpkg#40944

Pull Request resolved: #2293

Reviewed By: Gownta

Differential Revision: D62785183

Pulled By: Orvid

fbshipit-source-id: d45768f12d28f53122fdedfc396f1d27c7259d19
facebook-github-bot pushed a commit to facebook/hhvm that referenced this issue Sep 30, 2024
Summary:
Workaround for facebook/folly#2250.

Ideally, the code should support the generator expression, but this workaround fixes the problem for fmt.

Also, see fmtlib/fmt#4159 and microsoft/vcpkg#40944

X-link: facebook/folly#2293

Reviewed By: Gownta

Differential Revision: D62785183

Pulled By: Orvid

fbshipit-source-id: d45768f12d28f53122fdedfc396f1d27c7259d19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant