summaryrefslogtreecommitdiffstats
path: root/Source/cmCustomCommandGenerator.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-10-28 15:33:02 (GMT)
committerBrad King <brad.king@kitware.com>2016-10-28 19:08:03 (GMT)
commite7480d670b9a20bc5d8b17db5a9427fafb212e85 (patch)
tree37fc4589a169671c42299a80e7f832a11ade84a1 /Source/cmCustomCommandGenerator.h
parentee0f2d23fcf3cd7a67ad8d7bd132a475ed78405f (diff)
downloadCMake-e7480d670b9a20bc5d8b17db5a9427fafb212e85.zip
CMake-e7480d670b9a20bc5d8b17db5a9427fafb212e85.tar.gz
CMake-e7480d670b9a20bc5d8b17db5a9427fafb212e85.tar.bz2
Fix custom command target substitution with CROSSCOMPILING_EMULATOR
In commit v3.6.0-rc1~88^2 (CustomCommandGenerator: Add support for CROSSCOMPILING_EMULATOR, 2016-05-04) logic was introduced to substitute a target's `CROSSCOMPILING_EMULATOR` for argv0 in a custom command. However, it broke the case when the argv0 was a target name and now fails to expand the target name to its location at the same time as inserting the emulator. Fix the latter case. Inspired-by: Brian Maher <brian@brimworks.com> Closes: #16288
Diffstat (limited to 'Source/cmCustomCommandGenerator.h')
-rw-r--r--Source/cmCustomCommandGenerator.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmCustomCommandGenerator.h b/Source/cmCustomCommandGenerator.h
index 23cc596..8983c54 100644
--- a/Source/cmCustomCommandGenerator.h
+++ b/Source/cmCustomCommandGenerator.h
@@ -23,6 +23,9 @@ class cmCustomCommandGenerator
mutable bool DependsDone;
mutable std::vector<std::string> Depends;
+ const char* GetCrossCompilingEmulator(unsigned int c) const;
+ const char* GetArgv0Location(unsigned int c) const;
+
public:
cmCustomCommandGenerator(cmCustomCommand const& cc,
const std::string& config, cmLocalGenerator* lg);
@@ -30,7 +33,6 @@ public:
cmCustomCommand const& GetCC() const { return this->CC; }
unsigned int GetNumberOfCommands() const;
std::string GetCommand(unsigned int c) const;
- bool UseCrossCompilingEmulator(unsigned int c) const;
void AppendArguments(unsigned int c, std::string& cmd) const;
const char* GetComment() const;
std::string GetWorkingDirectory() const;