diff options
author | Brad King <brad.king@kitware.com> | 2020-12-15 12:40:26 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-12-15 12:40:34 (GMT) |
commit | 67f12dd1d606e3e1fe04d75d29f29db41aec5dda (patch) | |
tree | de0be0cce300084dc3353b5a5ee88bb7b31ad033 /Source/cmNinjaTargetGenerator.cxx | |
parent | 38dbbae26ca1bc5f6c65b38f596e74899a19cae1 (diff) | |
parent | c9a50f35565dcc1df8bd82126ecced95e60c29e4 (diff) | |
download | CMake-67f12dd1d606e3e1fe04d75d29f29db41aec5dda.zip CMake-67f12dd1d606e3e1fe04d75d29f29db41aec5dda.tar.gz CMake-67f12dd1d606e3e1fe04d75d29f29db41aec5dda.tar.bz2 |
Merge topic 'ispc_control_header_suffixes'
c9a50f3556 ISPC: Generated Headers suffix configurable with a better default
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5597
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index 838cf4c..9075563 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1356,6 +1356,11 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( this->GeneratorTarget->GetObjectName(source); std::string ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(objectName); + ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(ispcSource); + + cmProp ispcSuffixProp = + this->GeneratorTarget->GetProperty("ISPC_HEADER_SUFFIX"); + assert(ispcSuffixProp != nullptr); std::string ispcHeaderDirectory = this->GeneratorTarget->GetObjectDirectory(config); @@ -1366,7 +1371,7 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( } std::string ispcHeader = - cmStrCat(ispcHeaderDirectory, '/', ispcSource, ".h"); + cmStrCat(ispcHeaderDirectory, '/', ispcSource, *ispcSuffixProp); ispcHeader = this->ConvertToNinjaPath(ispcHeader); // Make sure ninja knows what command generates the header |