diff options
author | Brad King <brad.king@kitware.com> | 2010-12-09 15:12:12 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2010-12-09 15:12:12 (GMT) |
commit | 608d6bba89a5588c370dda6d6d46365c24168b55 (patch) | |
tree | 1039c92cc725a9e117ccf1a43f8f135cb886b26c /Source/cmTarget.cxx | |
parent | d25638ac0519fde108a8743ca0a8831d8512af5e (diff) | |
download | CMake-608d6bba89a5588c370dda6d6d46365c24168b55.zip CMake-608d6bba89a5588c370dda6d6d46365c24168b55.tar.gz CMake-608d6bba89a5588c370dda6d6d46365c24168b55.tar.bz2 |
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".
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ca61b1f..689550a 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -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(); |