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/cmMakefileTargetGenerator.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/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ee97429..ebfddb9 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -197,6 +197,17 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() } } + std::string currentBinDir = + this->LocalGenerator->GetCurrentBinaryDirectory(); + + // Look for ISPC extra object files generated by this target + auto ispcAdditionalObjs = + this->GeneratorTarget->GetGeneratedISPCObjects(this->GetConfigName()); + for (std::string const& ispcObj : ispcAdditionalObjs) { + this->CleanFiles.insert(this->LocalGenerator->MaybeConvertToRelativePath( + currentBinDir, ispcObj)); + } + // add custom commands to the clean rules? bool clean = cmIsOff(this->Makefile->GetProperty("CLEAN_NO_CUSTOM")); @@ -205,8 +216,6 @@ void cmMakefileTargetGenerator::WriteTargetBuildRules() std::vector<cmSourceFile const*> customCommands; this->GeneratorTarget->GetCustomCommands(customCommands, this->GetConfigName()); - std::string currentBinDir = - this->LocalGenerator->GetCurrentBinaryDirectory(); for (cmSourceFile const* sf : customCommands) { cmCustomCommandGenerator ccg(*sf->GetCustomCommand(), this->GetConfigName(), this->LocalGenerator); @@ -1494,6 +1503,11 @@ void cmMakefileTargetGenerator::WriteObjectsStrings( for (std::string const& obj : this->ExternalObjects) { helper.Feed(obj); } + auto ispcAdditionalObjs = + this->GeneratorTarget->GetGeneratedISPCObjects(this->GetConfigName()); + for (std::string const& obj : ispcAdditionalObjs) { + helper.Feed(obj); + } helper.Done(); } |