diff options
author | Brad King <brad.king@kitware.com> | 2019-10-04 14:13:13 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2019-10-04 14:15:08 (GMT) |
commit | 395e5f77fcd900b4a7a48eaa2da2e3554b694cf1 (patch) | |
tree | 62863c7b211c308143a33de309a7311192f67cfc /Source/cmLocalGenerator.cxx | |
parent | a988cc8789bf00dd8783192f95e02ccbfea78302 (diff) | |
parent | 83c1657ff7fda3dc86b49bc9039f59449f2d8ae4 (diff) | |
download | CMake-395e5f77fcd900b4a7a48eaa2da2e3554b694cf1.zip CMake-395e5f77fcd900b4a7a48eaa2da2e3554b694cf1.tar.gz CMake-395e5f77fcd900b4a7a48eaa2da2e3554b694cf1.tar.bz2 |
Merge topic 'unity-step'
83c1657ff7 Unity build: Generate sources during Compute step
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3884
Diffstat (limited to 'Source/cmLocalGenerator.cxx')
-rw-r--r-- | Source/cmLocalGenerator.cxx | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx index ae5139a..ccd70a3 100644 --- a/Source/cmLocalGenerator.cxx +++ b/Source/cmLocalGenerator.cxx @@ -2452,13 +2452,18 @@ void cmLocalGenerator::AddPchDependencies(cmGeneratorTarget* target, } } -void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target, - const std::string& config) +void cmLocalGenerator::AddUnityBuild(cmGeneratorTarget* target) { if (!target->GetPropertyAsBool("UNITY_BUILD")) { return; } + // FIXME: Handle all configurations in multi-config generators. + std::string config; + if (!this->GetGlobalGenerator()->IsMultiConfig()) { + config = this->Makefile->GetSafeDefinition("CMAKE_BUILD_TYPE"); + } + const std::string buildType = cmSystemTools::UpperCase(config); std::string filename_base = |