VS: Fix rebuild with regeneration after input CMake code change (#15754)
When using "cmake --build ." or "MSBuild ALL_BUILD.vcxproj" to drive the build the dependencies in the .sln file are not considered. This means that ProjectReference elements in .vcxproj files are used to order targets. We must ensure that the ZERO_CHECK target is listed as the first dependency of every target so that when it causes regeneration of the build files then MSBuild has not yet loaded the updated files.
This commit is contained in:
parent
03bfe71ae0
commit
40c7b46123
|
@ -2849,7 +2849,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences()
|
||||||
= this->GlobalGenerator->GetTargetDirectDepends(this->GeneratorTarget);
|
= this->GlobalGenerator->GetTargetDirectDepends(this->GeneratorTarget);
|
||||||
typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet
|
typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet
|
||||||
OrderedTargetDependSet;
|
OrderedTargetDependSet;
|
||||||
OrderedTargetDependSet depends(unordered, std::string());
|
OrderedTargetDependSet depends(unordered, CMAKE_CHECK_BUILD_SYSTEM_TARGET);
|
||||||
this->WriteString("<ItemGroup>\n", 1);
|
this->WriteString("<ItemGroup>\n", 1);
|
||||||
for( OrderedTargetDependSet::const_iterator i = depends.begin();
|
for( OrderedTargetDependSet::const_iterator i = depends.begin();
|
||||||
i != depends.end(); ++i)
|
i != depends.end(); ++i)
|
||||||
|
|
Loading…
Reference in New Issue