[vcpkg postcheck] Check the folder name of the generated cmake file#12604
[vcpkg postcheck] Check the folder name of the generated cmake file#12604JackBoosY wants to merge 15 commits intomicrosoft:masterfrom
Conversation
strega-nil
left a comment
There was a problem hiding this comment.
I see some changes that need to be done so that it follows the style of vcpkg, and also some better ways to do the things (using Strings::ends_with instead of .find, for example). Additionally, we need to use fs::u8string instead of .string(), to avoid locale-specificity.
|
@JackBoosY could you do the suggestions? |
…jack/check_cmake_file_directory
|
@strega-nil Sorry, I forgot it. Done. |
|
Hrmm, now that I'm looking at this, this check seems wrong? Check out the
|
|
@strega-nil Sadly, it does affect us to get the correct *-config.cmake. |
|
This doesn't build cleanly anymore due to the u8path thing. |
|
@BillyONeal More details? |
|
I assume the Arrow 'regression' is what you are trying to look for? :) |
| auto filename = fs::u8string(file_path.filename()); | ||
| if (Strings::ends_with(filename, UPPER_CONFIG)) | ||
| { | ||
| config_prefix = filename.substr(0, filename.size() - UPPER_CONFIG.size()); |
There was a problem hiding this comment.
Should we also check for "CoNFiG.cmAkE" (And possibly fail the results if any such things are present?)
There was a problem hiding this comment.
Nope, generally, the file names generated by cmake are fixed.
| cmake_file.filename().string().c_str(), | ||
| cmake_file.parent_path().string().c_str(), |
There was a problem hiding this comment.
These probably need to use some form of u8something rather than string()
Can you link where this happens? |
strega-nil
left a comment
There was a problem hiding this comment.
I would like to see the bug this fixes.
|
@ras0219 Maybe I misunderstood this point, but it did cause some problems. |
|
@strega-nil Example #12997 #12592 etc. |
|
According to the official document, I think this PR is no longer needed. |
Since
find_packageis case-sensitive in *nix, check after the build whether the name of the generated cmake file matches the name of the folder where it is located.