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

pass /utf-8 only when compiler is MSVC #3260

Merged
merged 1 commit into from
Nov 22, 2024
Merged

Conversation

miyanyan
Copy link
Contributor

this pr is same as fmtlib/fmt#4159

when using clang++ on windows, "/utf-8" is not work.

@gabime
Copy link
Owner

gabime commented Nov 22, 2024

@miyanyan Why the if(MSVC) on top isn't enough here? Also why the (redundant ?) COMPILE_LANGUAGE:CXXcheck ?

@gabime gabime merged commit 9edab1b into gabime:v1.x Nov 22, 2024
16 checks passed
@miyanyan
Copy link
Contributor Author

@miyanyan Why the if(MSVC) on top isn't enough here? Also why the (redundant ?) COMPILE_LANGUAGE:CXXcheck ?

seems clang will simulate msvc, like define_MSC_VER
https://cmake.org/cmake/help/latest/variable/MSVC.html
https://clang.llvm.org/docs/MSVCCompatibility.html

Set to true when the compiler is some version of Microsoft Visual C++ or another compiler simulating the Visual C++ cl command-line syntax.

@gabime
Copy link
Owner

gabime commented Nov 22, 2024

Megred. Thanks @miyanyan

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

Successfully merging this pull request may close these issues.

2 participants