Add VCPKG_SCRIPTS_DIR and VCPKG_TOOLS_DIR to the CMake command call#1420
Add VCPKG_SCRIPTS_DIR and VCPKG_TOOLS_DIR to the CMake command call#1420Neumann-A wants to merge 2 commits intomicrosoft:mainfrom
Conversation
| local_variables.emplace_back("BUILDTREES_DIR", paths.buildtrees()); | ||
| local_variables.emplace_back("_VCPKG_INSTALLED_DIR", paths.installed().root()); | ||
| local_variables.emplace_back("DOWNLOADS", paths.downloads); | ||
| local_variables.emplace_back("VCPKG_SCRIPTS_DIR", paths.scripts); |
There was a problem hiding this comment.
Should this be just SCRIPTS since it is already defined in ports.cmake ?
|
Alternately I think |
Please explain |
The only acceptable content for the scripts tree is the same content that matches the copy of |
I am still missing the why explanation here. So I still need a sentence which starts something like "because otherwise ...." or something logically similar. Whatever the decision about the cli switch this PR just passes down internal path knowledge. If this is scripts dir or the dir of the cmake entry point (ports.cmake) with the scripts subfolder added doesnt really matter. |
There isn't going to be a 'because otherwise'. We reserve the right to make coordinated tool and scripts tree changes, so the set of potential issues is undefined.
In general I'm happy with not calculating something multiple times; I just think the right fix here is to delete the scripts dir setting entirely. It does not exist to do practical things, it exists because once upon a time we blindly added knobs for "all the directories" even ones that would be meaningless to touch.
This proposed VCPKG_TOOLS_DIR and the one in |
There is no
I don't think you can do that considering that ports.cmake defines: which makes the script dir an (indirectly) official variable and changing that would be a breaking change for others? I don't mind the scripts variable too much IF the triplet file always gets to to see the same set of predefined functions. Currently the triplet is included in two different ways once from ports.cmake with everything defined and once with nothing when calculating the settings. |
That we have a variable pointing there does not mean that we support what happens if someone tries to change it to something else. If that had been added after we added the X- and Z- conventions that would have a Z-. Given that we are already setting the variable I can see the argument to calculate it in one place and not all over the place but there is no practical feature in trying to separate the scripts tree from the tool. As for |
To make stuff mentioned in #1315 (comment) not magically (and maybe even wrongly) calculate those paths.