summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake
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 /Tests/RunCMake
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 'Tests/RunCMake')
-rw-r--r--Tests/RunCMake/pseudo_emulator_custom_command.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Tests/RunCMake/pseudo_emulator_custom_command.c b/Tests/RunCMake/pseudo_emulator_custom_command.c
index 760e83c..3a94795 100644
--- a/Tests/RunCMake/pseudo_emulator_custom_command.c
+++ b/Tests/RunCMake/pseudo_emulator_custom_command.c
@@ -14,7 +14,8 @@
int main(int argc, const char* argv[])
{
const char* substring_failure = "generated_exe_emulator_unexpected";
- const char* substring_success = "generated_exe_emulator_expected";
+ // Require a slash to make sure it is a path and not a target name.
+ const char* substring_success = "/generated_exe_emulator_expected";
const char* str = argv[1];
if (argc < 2) {
return EXIT_FAILURE;