summaryrefslogtreecommitdiffstats
path: root/Source/cmNinjaTargetGenerator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r--Source/cmNinjaTargetGenerator.cxx7
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