From 40c7b4612341e4230516ef32a97449051379790a Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 22 Sep 2015 10:20:44 -0400 Subject: 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. --- Source/cmVisualStudio10TargetGenerator.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index b91ae11..92403e3 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -2849,7 +2849,7 @@ void cmVisualStudio10TargetGenerator::WriteProjectReferences() = this->GlobalGenerator->GetTargetDirectDepends(this->GeneratorTarget); typedef cmGlobalVisualStudioGenerator::OrderedTargetDependSet OrderedTargetDependSet; - OrderedTargetDependSet depends(unordered, std::string()); + OrderedTargetDependSet depends(unordered, CMAKE_CHECK_BUILD_SYSTEM_TARGET); this->WriteString("\n", 1); for( OrderedTargetDependSet::const_iterator i = depends.begin(); i != depends.end(); ++i) -- cgit v0.12