summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefileTargetGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-12-15 12:40:26 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-12-15 12:40:34 (GMT)
commit67f12dd1d606e3e1fe04d75d29f29db41aec5dda (patch)
treede0be0cce300084dc3353b5a5ee88bb7b31ad033 /Source/cmMakefileTargetGenerator.cxx
parent38dbbae26ca1bc5f6c65b38f596e74899a19cae1 (diff)
parentc9a50f35565dcc1df8bd82126ecced95e60c29e4 (diff)
downloadCMake-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/cmMakefileTargetGenerator.cxx')
-rw-r--r--Source/cmMakefileTargetGenerator.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx
index ee47e46..1f23424 100644
--- a/Source/cmMakefileTargetGenerator.cxx
+++ b/Source/cmMakefileTargetGenerator.cxx
@@ -644,6 +644,11 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
if (lang == "ISPC") {
std::string ispcSource =
cmSystemTools::GetFilenameWithoutLastExtension(objectName);
+ ispcSource = cmSystemTools::GetFilenameWithoutLastExtension(ispcSource);
+
+ cmProp ispcSuffixProp =
+ this->GeneratorTarget->GetProperty("ISPC_HEADER_SUFFIX");
+ assert(ispcSuffixProp != nullptr);
std::string directory = this->GeneratorTarget->GetObjectDirectory(config);
if (cmProp prop =
@@ -651,7 +656,7 @@ void cmMakefileTargetGenerator::WriteObjectRuleFiles(
directory =
cmStrCat(this->LocalGenerator->GetBinaryDirectory(), '/', *prop);
}
- ispcHeaderRelative = cmStrCat(directory, '/', ispcSource, ".h");
+ ispcHeaderRelative = cmStrCat(directory, '/', ispcSource, *ispcSuffixProp);
ispcHeaderForShell = this->LocalGenerator->ConvertToOutputFormat(
ispcHeaderRelative, cmOutputConverter::SHELL);
}