diff options
author | Dan Johnston <dan.e.johnston@gmail.com> | 2020-01-14 18:17:15 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-01-16 15:32:25 (GMT) |
commit | 97c124e30f530f64fafdc2b3a9decd1bf31bcf9c (patch) | |
tree | fa51db1fb364e307b3a46ff08a9c3ed4feece622 /Source/cmNinjaTargetGenerator.cxx | |
parent | ebd0b16ddbfc64d627aae7acb991aefa7179fa8b (diff) | |
download | CMake-97c124e30f530f64fafdc2b3a9decd1bf31bcf9c.zip CMake-97c124e30f530f64fafdc2b3a9decd1bf31bcf9c.tar.gz CMake-97c124e30f530f64fafdc2b3a9decd1bf31bcf9c.tar.bz2 |
Ninja: Add a separate job pool for PCH creation
Add a `JOB_POOL_PRECOMPILE_HEADER` target property to specify the pool
name, and its associated `CMAKE_JOB_POOL_PRECOMPILE_HEADER` variable.
Fixes: #20217
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index bd19b28..5a8c144 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1196,6 +1196,13 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( this->addPoolNinjaVariable("JOB_POOL_COMPILE", this->GetGeneratorTarget(), vars); + if (!pchSource.empty() && !source->GetProperty("SKIP_PRECOMPILE_HEADERS")) { + if (source->GetFullPath() == pchSource) { + this->addPoolNinjaVariable("JOB_POOL_PRECOMPILE_HEADER", + this->GetGeneratorTarget(), vars); + } + } + this->SetMsvcTargetPdbVariable(vars, config); objBuild.RspFile = objectFileName + ".rsp"; |