diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-07-28 18:52:36 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-09-04 12:37:07 (GMT) |
commit | a020787a9b7ede3aa490345bd446e469fb1713d2 (patch) | |
tree | f96ef2b1d84515fda4288ffaf39e9abfb8c9cc1a /Source/cmNinjaTargetGenerator.cxx | |
parent | 5a1750017e65727660167ae1953746a3fd3d2c7b (diff) | |
download | CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.zip CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.tar.gz CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.tar.bz2 |
ISPC: Support generation for multiple instruction sets
Diffstat (limited to 'Source/cmNinjaTargetGenerator.cxx')
-rw-r--r-- | Source/cmNinjaTargetGenerator.cxx | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Source/cmNinjaTargetGenerator.cxx b/Source/cmNinjaTargetGenerator.cxx index b19b620..accdcf1 100644 --- a/Source/cmNinjaTargetGenerator.cxx +++ b/Source/cmNinjaTargetGenerator.cxx @@ -1398,6 +1398,19 @@ void cmNinjaTargetGenerator::WriteObjectBuildStatement( // Make sure ninja knows how to clean the generated header this->GetGlobalGenerator()->AddAdditionalCleanFile(ispcHeader, config); + auto ispcSuffixes = + detail::ComputeISPCObjectSuffixes(this->GeneratorTarget); + if (ispcSuffixes.size() > 1) { + auto ispcSideEfffectObjects = detail::ComputeISPCExtraObjects( + objectName, ispcDirectory, ispcSuffixes); + + for (auto sideEffect : ispcSideEfffectObjects) { + sideEffect = this->ConvertToNinjaPath(sideEffect); + objBuild.ImplicitOuts.emplace_back(sideEffect); + this->GetGlobalGenerator()->AddAdditionalCleanFile(sideEffect, config); + } + } + vars["ISPC_HEADER_FILE"] = this->GetLocalGenerator()->ConvertToOutputFormat( ispcHeader, cmOutputConverter::SHELL); |