Restore honoring CMAKE_GENERATOR_INSTANCE in toolchain file
Revert the changes from commitd5b5c19278
(cmGlobalGenerator: FindMakeProgram() before CMakeDetermineSystem, 2020-06-15, v3.19.0-rc1~619^2~3) and commitef91fb02f3
(cmGlobalGenerator: FindMakeProgram() at a generator-specific time, 2020-11-23, v3.19.1~2^2). We must delay selecting the location of MSBuild until after an instance of Visual Studio has been selected. It is now safe to revert the ordering because the motivating use case (sysroot detection in Platform/Android-Determine) has been implemented another way. Fixes: #22782
This commit is contained in:
parent
42418b02f7
commit
46e9ff5729
@ -593,16 +593,6 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
}
|
||||
}
|
||||
|
||||
if (readCMakeSystem) {
|
||||
// Find the native build tool for this generator.
|
||||
// This has to be done early so that MSBuild can be used to examine the
|
||||
// cross-compilation environment.
|
||||
if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Early &&
|
||||
!this->FindMakeProgram(mf)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Load the CMakeDetermineSystem.cmake file and find out
|
||||
// what platform we are running on
|
||||
if (!mf->GetDefinition("CMAKE_SYSTEM")) {
|
||||
@ -676,8 +666,7 @@ void cmGlobalGenerator::EnableLanguage(
|
||||
}
|
||||
|
||||
// Find the native build tool for this generator.
|
||||
if (this->GetFindMakeProgramStage() == FindMakeProgramStage::Late &&
|
||||
!this->FindMakeProgram(mf)) {
|
||||
if (!this->FindMakeProgram(mf)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -625,17 +625,6 @@ protected:
|
||||
|
||||
std::string GetPredefinedTargetsFolder() const;
|
||||
|
||||
enum class FindMakeProgramStage
|
||||
{
|
||||
Early,
|
||||
Late,
|
||||
};
|
||||
|
||||
virtual FindMakeProgramStage GetFindMakeProgramStage() const
|
||||
{
|
||||
return FindMakeProgramStage::Late;
|
||||
}
|
||||
|
||||
private:
|
||||
using TargetMap = std::unordered_map<std::string, cmTarget*>;
|
||||
using GeneratorTargetMap =
|
||||
|
@ -167,11 +167,6 @@ protected:
|
||||
|
||||
void WriteSLNHeader(std::ostream& fout);
|
||||
|
||||
FindMakeProgramStage GetFindMakeProgramStage() const override
|
||||
{
|
||||
return FindMakeProgramStage::Early;
|
||||
}
|
||||
|
||||
bool ComputeTargetDepends() override;
|
||||
class VSDependSet : public std::set<std::string>
|
||||
{
|
||||
|
@ -138,11 +138,6 @@ protected:
|
||||
void AddExtraIDETargets() override;
|
||||
void Generate() override;
|
||||
|
||||
FindMakeProgramStage GetFindMakeProgramStage() const override
|
||||
{
|
||||
return FindMakeProgramStage::Early;
|
||||
}
|
||||
|
||||
private:
|
||||
enum EmbedActionFlags
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user