CMake/Source/cmNinjaTypes.h
Ben Boeckel adf60b2838 ninja: break unnecessary target dependencies
Previously, given two libraries, X and Y where X depends on Y, all
object compilations of X would require the Y library to have been linked
before being compiled. This is not necessary and can instead be loosened
such that object compilations of X only depend on the order-only
dependencies of Y to be completed. This is to ensure that generated
sources, headers, custom commands, etc. are completed before X starts to
compile its objects.

This should help build performance in projects with many libraries which
cause a deep library dependency chain. Previously, a library at the
bottom would not start compilation until after all other libraries
completed, but now only its link step needs to wait and its compilation
jobs can be run in parallel with other tasks.

Fixes: #15555
2017-04-21 08:57:40 -04:00

22 lines
507 B
C++

/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
#ifndef cmNinjaTypes_h
#define cmNinjaTypes_h
#include "cmConfigure.h" // IWYU pragma: keep
#include <map>
#include <string>
#include <vector>
enum cmNinjaTargetDepends
{
DependOnTargetArtifact,
DependOnTargetOrdering
};
typedef std::vector<std::string> cmNinjaDeps;
typedef std::map<std::string, std::string> cmNinjaVars;
#endif // ! cmNinjaTypes_h