summaryrefslogtreecommitdiff
path: root/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/LoadCommand/CMakeCommands/cmTestCommand.c')
-rw-r--r--Tests/LoadCommand/CMakeCommands/cmTestCommand.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
index b1431cfc57..84d1619322 100644
--- a/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
+++ b/Tests/LoadCommand/CMakeCommands/cmTestCommand.c
@@ -146,6 +146,14 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
ccDep[0],
0, 0);
+
+ ccArgs[1] = "echo";
+ ccArgs[2] = "Build has finished";
+ info->CAPI->AddCustomCommandToTarget(mf, "LoadedCommand",
+ file,
+ 3, ccArgs,
+ CM_POST_BUILD);
+
info->CAPI->Free(file);
args[0] = "TEST_EXEC";
@@ -158,6 +166,13 @@ static int CCONV InitialPass(void *inf, void *mf, int argc, char *argv[])
}
info->CAPI->ExecuteCommand(mf,"SET",2,args);
+ // make sure we can find the source file
+ if (!info->CAPI->GetSource(mf,argv[1]))
+ {
+ info->CAPI->SetError(mf, "Source file could not be found!");
+ return 0;
+ }
+
return 1;
}