-
Notifications
You must be signed in to change notification settings - Fork 335
Add /msys64/ to msys detection for cmake tool on Windows #1777
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
base: main
Are you sure you want to change the base?
Conversation
|
The original code is a very precise heuristics to detect MSYS/Cygwin environment cmake (i.e. the one which only understands POSIX paths and doesn't offer VS generators, https://packages.msys2.org/base/cmake). What you try to detect/prevent now is cmake from the windows environment offered by msys2 (i.e. probably offering VS generators but somewhat broken around invoking RC for the Ninja generator, Not fixed by the The real common thing is that paths end in |
Given that the title mentions I think it's more efficient to search for
Judging by the comment on line 400, it's also intended to avoid using msys2's cmake. |
The comment says "version can't handle 'C:' in paths", but this is true only for
I think it is still extremely cheap to explicitly check the small set of known short strings at the end of the path. |
|
.. and |
|
Is there anything that distinguishes the problematic CMakes in the |
Quick check: Not sure if the msvc suffix is robust enough: Alternatively, I can point at the generator list from There is also |
Unfortunately not: C:\Program Files\Microsoft Visual Studio\2022\Enterprise>where cmake
C:\Program Files\CMake\bin\cmake.exe
C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
C:\Program Files\Microsoft Visual Studio\2022\Enterprise>cmake --version
cmake version 4.1.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
C:\Program Files\Microsoft Visual Studio\2022\Enterprise> |
|
IMO it is sufficient and cheap to determine the parent dir of |
I noticed that the path /msys64/ slips through when checking if the CMake binary is from msys.
Related issues: https://github.com/microsoft/vcpkg/issues?q=is%3Aissue%20state%3Aopen%20%22Command%20failed%3A%20C%3A%2Fmsys64%22
Closes microsoft/vcpkg#47171
Closes microsoft/vcpkg#46391
Closes microsoft/vcpkg#46188
Closes microsoft/vcpkg#44155
Closes microsoft/vcpkg#44154
Closes microsoft/vcpkg#47135