mirror of
https://github.com/reactos/CMake.git
synced 2024-11-29 22:40:25 +00:00
Fix parallel "make install" of CMake itself
Avoid tracing dependencies of GLOBAL_TARGET targets. The build system generators are not designed to handle any dependencies that may be discovered. Global targets are only generated by CMake and never have commands that reference targets built in the project anyway. The exception is when building CMake itself there is a special case to use the just-built "cmake" binary in the "install" target so that CMake can replace itself on Windows. Even in this special case we do not want to let the "install" target depend on the "cmake" target. Doing so breaks cases like "make -j4 install".
This commit is contained in:
parent
d25638ac05
commit
608d6bba89
@ -1450,6 +1450,15 @@ cmTargetTraceDependencies
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::TraceDependencies(const char* vsProjectFile)
|
||||
{
|
||||
// CMake-generated targets have no dependencies to trace. Normally tracing
|
||||
// would find nothing anyway, but when building CMake itself the "install"
|
||||
// target command ends up referencing the "cmake" target but we do not
|
||||
// really want the dependency because "install" depend on "all" anyway.
|
||||
if(this->GetType() == cmTarget::GLOBAL_TARGET)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// Use a helper object to trace the dependencies.
|
||||
cmTargetTraceDependencies tracer(this, this->Internal.Get(), vsProjectFile);
|
||||
tracer.Trace();
|
||||
|
Loading…
Reference in New Issue
Block a user