summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/add_custom_command
diff options
context:
space:
mode:
authorPeter Collingbourne <peter@pcc.me.uk>2014-11-05 20:37:52 (GMT)
committerBrad King <brad.king@kitware.com>2014-11-14 16:55:09 (GMT)
commitfe5d6e8c0f2e37bac0621a3b976d95c471891f38 (patch)
tree56d2a66bbf625ed8f3274baf3632aab2337dd6f1 /Tests/RunCMake/add_custom_command
parentad6ee426278ebaa9518af4573362a96b0544f4f7 (diff)
downloadCMake-fe5d6e8c0f2e37bac0621a3b976d95c471891f38.zip
CMake-fe5d6e8c0f2e37bac0621a3b976d95c471891f38.tar.gz
CMake-fe5d6e8c0f2e37bac0621a3b976d95c471891f38.tar.bz2
Add USES_TERMINAL option for custom commands
Teach the add_custom_command and add_custom_target commands a new USES_TERMINAL option. Use it to tell the generator to give the command direct access to the terminal if possible.
Diffstat (limited to 'Tests/RunCMake/add_custom_command')
-rw-r--r--Tests/RunCMake/add_custom_command/RunCMakeTest.cmake1
-rw-r--r--Tests/RunCMake/add_custom_command/SourceUsesTerminal-result.txt1
-rw-r--r--Tests/RunCMake/add_custom_command/SourceUsesTerminal-stderr.txt4
-rw-r--r--Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake1
4 files changed, 7 insertions, 0 deletions
diff --git a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
index a692600..d0f429a 100644
--- a/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_command/RunCMakeTest.cmake
@@ -6,3 +6,4 @@ run_cmake(BadArgument)
run_cmake(NoArguments)
run_cmake(NoOutputOrTarget)
run_cmake(OutputAndTarget)
+run_cmake(SourceUsesTerminal)
diff --git a/Tests/RunCMake/add_custom_command/SourceUsesTerminal-result.txt b/Tests/RunCMake/add_custom_command/SourceUsesTerminal-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/SourceUsesTerminal-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/add_custom_command/SourceUsesTerminal-stderr.txt b/Tests/RunCMake/add_custom_command/SourceUsesTerminal-stderr.txt
new file mode 100644
index 0000000..1a76c54
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/SourceUsesTerminal-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at SourceUsesTerminal.cmake:1 \(add_custom_command\):
+ add_custom_command USES_TERMINAL may not be used with SOURCE signatures
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake b/Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake
new file mode 100644
index 0000000..295fab1
--- /dev/null
+++ b/Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake
@@ -0,0 +1 @@
+add_custom_command(SOURCE t TARGET t USES_TERMINAL)