mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-09 07:39:47 -05:00
ISPC: Ninja properly compute ISPC_HEADER_DIRECTORY location
This commit is contained in:
@@ -1375,15 +1375,16 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
|||||||
std::string ispcSource =
|
std::string ispcSource =
|
||||||
cmSystemTools::GetFilenameWithoutLastExtension(objectName);
|
cmSystemTools::GetFilenameWithoutLastExtension(objectName);
|
||||||
|
|
||||||
std::string ispcDirectory = objectFileDir;
|
std::string ispcHeaderDirectory =
|
||||||
|
this->GeneratorTarget->GetObjectDirectory(config);
|
||||||
if (cmProp prop =
|
if (cmProp prop =
|
||||||
this->GeneratorTarget->GetProperty("ISPC_HEADER_DIRECTORY")) {
|
this->GeneratorTarget->GetProperty("ISPC_HEADER_DIRECTORY")) {
|
||||||
ispcDirectory = *prop;
|
ispcHeaderDirectory =
|
||||||
|
cmStrCat(this->LocalGenerator->GetBinaryDirectory(), '/', *prop);
|
||||||
}
|
}
|
||||||
ispcDirectory =
|
|
||||||
cmStrCat(this->LocalGenerator->GetBinaryDirectory(), '/', ispcDirectory);
|
|
||||||
|
|
||||||
std::string ispcHeader = cmStrCat(ispcDirectory, '/', ispcSource, ".h");
|
std::string ispcHeader =
|
||||||
|
cmStrCat(ispcHeaderDirectory, '/', ispcSource, ".h");
|
||||||
ispcHeader = this->ConvertToNinjaPath(ispcHeader);
|
ispcHeader = this->ConvertToNinjaPath(ispcHeader);
|
||||||
|
|
||||||
// Make sure ninja knows what command generates the header
|
// Make sure ninja knows what command generates the header
|
||||||
@@ -1395,8 +1396,10 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement(
|
|||||||
auto ispcSuffixes =
|
auto ispcSuffixes =
|
||||||
detail::ComputeISPCObjectSuffixes(this->GeneratorTarget);
|
detail::ComputeISPCObjectSuffixes(this->GeneratorTarget);
|
||||||
if (ispcSuffixes.size() > 1) {
|
if (ispcSuffixes.size() > 1) {
|
||||||
|
std::string rootObjectDir =
|
||||||
|
this->GeneratorTarget->GetObjectDirectory(config);
|
||||||
auto ispcSideEfffectObjects = detail::ComputeISPCExtraObjects(
|
auto ispcSideEfffectObjects = detail::ComputeISPCExtraObjects(
|
||||||
objectName, ispcDirectory, ispcSuffixes);
|
objectName, rootObjectDir, ispcSuffixes);
|
||||||
|
|
||||||
for (auto sideEffect : ispcSideEfffectObjects) {
|
for (auto sideEffect : ispcSideEfffectObjects) {
|
||||||
sideEffect = this->ConvertToNinjaPath(sideEffect);
|
sideEffect = this->ConvertToNinjaPath(sideEffect);
|
||||||
|
|||||||
Reference in New Issue
Block a user