summaryrefslogtreecommitdiffstats
path: root/Source/cmGhsMultiTargetGenerator.h
diff options
context:
space:
mode:
authorGeoff Viola <geoffrey.viola@asirobots.com>2016-05-05 04:49:27 (GMT)
committerBrad King <brad.king@kitware.com>2016-05-06 12:21:05 (GMT)
commit5e4287131bc53824eac949dcc56a4cee9f6f907d (patch)
tree6dc819dfd41d4d80688fbd4bcb5764571514bc81 /Source/cmGhsMultiTargetGenerator.h
parent8d7ef6a8b02f2fca4ccb9aaad71ca0d2235ce8a6 (diff)
downloadCMake-5e4287131bc53824eac949dcc56a4cee9f6f907d.zip
CMake-5e4287131bc53824eac949dcc56a4cee9f6f907d.tar.gz
CMake-5e4287131bc53824eac949dcc56a4cee9f6f907d.tar.bz2
GHS: Shorten long object paths with duplicate source names
Detect when the resulting object path is too long and compute an alternative name using a hash.
Diffstat (limited to 'Source/cmGhsMultiTargetGenerator.h')
-rw-r--r--Source/cmGhsMultiTargetGenerator.h11
1 files changed, 9 insertions, 2 deletions
diff --git a/Source/cmGhsMultiTargetGenerator.h b/Source/cmGhsMultiTargetGenerator.h
index 93761f2..9f18eeb 100644
--- a/Source/cmGhsMultiTargetGenerator.h
+++ b/Source/cmGhsMultiTargetGenerator.h
@@ -87,15 +87,22 @@ private:
void
WriteCustomCommandsHelper(std::vector<cmCustomCommand> const &commandsSet,
cmTarget::CustomCommandType commandType);
- void WriteSources(std::vector<cmSourceFile *> const &objectSources);
+ void WriteSources(
+ std::vector<cmSourceFile *> const &objectSources,
+ std::map<const cmSourceFile *, std::string> const &objectNames);
static std::map<const cmSourceFile *, std::string>
- GetObjectNames(const std::vector<cmSourceFile *> &objectSources);
+ GetObjectNames(std::vector<cmSourceFile *> *objectSources,
+ cmLocalGhsMultiGenerator *localGhsMultiGenerator,
+ cmGeneratorTarget *generatorTarget);
static void WriteObjectLangOverride(cmGeneratedFileStream *fileStream,
cmSourceFile *sourceFile);
static void WriteObjectDir(cmGeneratedFileStream *fileStream,
std::string const &dir);
std::string GetOutputDirectory(const std::string &config) const;
std::string GetOutputFilename(const std::string &config) const;
+ static std::string ComputeLongestObjectDirectory(
+ cmLocalGhsMultiGenerator const *localGhsMultiGenerator,
+ cmGeneratorTarget *generatorTarget, cmSourceFile *const sourceFile);
bool IsNotKernel(std::string const &config, const std::string &language);
static bool DetermineIfTargetGroup(const cmGeneratorTarget* target);