[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-638-geb695ff
Brad King
brad.king at kitware.com
Fri Nov 14 11:56:58 EST 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via eb695ff8a578bca4f114fe9bf9660595863cc737 (commit)
via 24234dac3900cd65ede213cf6c34ad671d506fd6 (commit)
via 72312c2f406b1b52920089c1c646d299a5d8ed22 (commit)
via 020067ab50ad58bd03c73f9badc084047c7ed00b (commit)
from b980eda87c16ab0a88fc499b6b4fb93ec5db2690 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=eb695ff8a578bca4f114fe9bf9660595863cc737
commit eb695ff8a578bca4f114fe9bf9660595863cc737
Merge: b980eda 24234da
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 11:56:57 2014 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Nov 14 11:56:57 2014 -0500
Merge topic 'console-pool' into next
24234dac Limit custom command/target signatures allowing USES_TERMINAL
72312c2f Help: Revise USES_TERMINAL option documentation
020067ab Help: Revise notes for topic 'console-pool'
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=24234dac3900cd65ede213cf6c34ad671d506fd6
commit 24234dac3900cd65ede213cf6c34ad671d506fd6
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 11:20:34 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 14 11:51:26 2014 -0500
Limit custom command/target signatures allowing USES_TERMINAL
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 3cd057a..cb0746b 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -157,7 +157,8 @@ target is already built, the command will not execute.
COMMAND command1 [ARGS] [args1...]
[COMMAND command2 [ARGS] [args2...] ...]
[WORKING_DIRECTORY dir]
- [COMMENT comment] [VERBATIM])
+ [COMMENT comment]
+ [VERBATIM] [USES_TERMINAL])
This defines a new command that will be associated with building the
specified target. When the command will happen is determined by which
diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx
index 94cfb31..410f978 100644
--- a/Source/cmAddCustomCommandCommand.cxx
+++ b/Source/cmAddCustomCommandCommand.cxx
@@ -351,6 +351,11 @@ bool cmAddCustomCommandCommand
}
}
}
+ else if (uses_terminal)
+ {
+ this->SetError("USES_TERMINAL may not be used with SOURCE signatures");
+ return false;
+ }
else
{
bool issueMessage = true;
diff --git a/Source/cmAddCustomTargetCommand.cxx b/Source/cmAddCustomTargetCommand.cxx
index 3025719..fc4f8f1 100644
--- a/Source/cmAddCustomTargetCommand.cxx
+++ b/Source/cmAddCustomTargetCommand.cxx
@@ -227,6 +227,13 @@ bool cmAddCustomTargetCommand
cmSystemTools::CollapseFullPath(working_directory, build_dir);
}
+ if (commandLines.empty() && uses_terminal)
+ {
+ this->Makefile->IssueMessage(cmake::FATAL_ERROR,
+ "USES_TERMINAL may not be specified without any COMMAND");
+ return true;
+ }
+
// Add the utility target to the makefile.
bool escapeOldStyle = !verbatim;
cmTarget* target =
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)
diff --git a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
index 4e4a8ae..a612da9 100644
--- a/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
+++ b/Tests/RunCMake/add_custom_target/RunCMakeTest.cmake
@@ -2,3 +2,4 @@ include(RunCMake)
run_cmake(NoArguments)
run_cmake(BadTargetName)
+run_cmake(UsesTerminalNoCommand)
diff --git a/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-result.txt b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-result.txt
new file mode 100644
index 0000000..d00491f
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-result.txt
@@ -0,0 +1 @@
+1
diff --git a/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-stderr.txt b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-stderr.txt
new file mode 100644
index 0000000..beafa7c
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-stderr.txt
@@ -0,0 +1,4 @@
+CMake Error at UsesTerminalNoCommand.cmake:1 \(add_custom_target\):
+ USES_TERMINAL may not be specified without any COMMAND
+Call Stack \(most recent call first\):
+ CMakeLists.txt:3 \(include\)
diff --git a/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand.cmake b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand.cmake
new file mode 100644
index 0000000..b0c207b
--- /dev/null
+++ b/Tests/RunCMake/add_custom_target/UsesTerminalNoCommand.cmake
@@ -0,0 +1 @@
+add_custom_target(MyTarget USES_TERMINAL)
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=72312c2f406b1b52920089c1c646d299a5d8ed22
commit 72312c2f406b1b52920089c1c646d299a5d8ed22
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 11:14:14 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 14 11:51:14 2014 -0500
Help: Revise USES_TERMINAL option documentation
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst
index 21f5930..3cd057a 100644
--- a/Help/command/add_custom_command.rst
+++ b/Help/command/add_custom_command.rst
@@ -18,7 +18,8 @@ The first signature is for adding a custom command to produce an output::
[IMPLICIT_DEPENDS <lang1> depend1
[<lang2> depend2] ...]
[WORKING_DIRECTORY dir]
- [COMMENT comment] [VERBATIM] [APPEND] [USES_TERMINAL])
+ [COMMENT comment]
+ [VERBATIM] [APPEND] [USES_TERMINAL])
This defines a command to generate specified ``OUTPUT`` file(s).
A target created in the same directory (``CMakeLists.txt`` file)
@@ -122,8 +123,8 @@ The options are:
``USES_TERMINAL``
The command will be given direct access to the terminal if possible.
- With the Ninja generator, this places the command in the ``console``
- pool.
+ With the :generator:`Ninja` generator, this places the command in
+ the ``console`` pool.
``VERBATIM``
All arguments to the commands will be escaped properly for the
diff --git a/Help/command/add_custom_target.rst b/Help/command/add_custom_target.rst
index 81a94a1..8b7472d 100644
--- a/Help/command/add_custom_target.rst
+++ b/Help/command/add_custom_target.rst
@@ -9,7 +9,8 @@ Add a target with no output so it will always be built.
[COMMAND command2 [args2...] ...]
[DEPENDS depend depend depend ... ]
[WORKING_DIRECTORY dir]
- [COMMENT comment] [VERBATIM] [USES_TERMINAL]
+ [COMMENT comment]
+ [VERBATIM] [USES_TERMINAL]
[SOURCES src1 [src2...]])
Adds a target with the given name that executes the given commands.
@@ -76,8 +77,8 @@ The options are:
``USES_TERMINAL``
The command will be given direct access to the terminal if possible.
- With the Ninja generator, this places the command in the ``console``
- pool.
+ With the :generator:`Ninja` generator, this places the command in
+ the ``console`` pool.
``WORKING_DIRECTORY``
Execute the command with the given current working directory.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=020067ab50ad58bd03c73f9badc084047c7ed00b
commit 020067ab50ad58bd03c73f9badc084047c7ed00b
Author: Brad King <brad.king at kitware.com>
AuthorDate: Fri Nov 14 11:13:38 2014 -0500
Commit: Brad King <brad.king at kitware.com>
CommitDate: Fri Nov 14 11:51:05 2014 -0500
Help: Revise notes for topic 'console-pool'
diff --git a/Help/release/dev/console-pool.rst b/Help/release/dev/console-pool.rst
index df34f2e..19c2f19 100644
--- a/Help/release/dev/console-pool.rst
+++ b/Help/release/dev/console-pool.rst
@@ -1,7 +1,8 @@
console-pool
------------
-* A USES_TERMINAL flag has been added to the add_custom_command and
- add_custom_target commands. The flag gives the command direct access to
- the terminal if possible. With the Ninja generator, it places the command
- in the console pool.
+* The :command:`add_custom_command` and :command:`add_custom_target`
+ commands learned a new ``USES_TERMINAL`` option to request that
+ the command be given direct access to the terminal if possible.
+ The :generator:`Ninja` generator will places such commands in the
+ ``console`` pool.
-----------------------------------------------------------------------
Summary of changes:
Help/command/add_custom_command.rst | 10 ++++++----
Help/command/add_custom_target.rst | 7 ++++---
Help/release/dev/console-pool.rst | 9 +++++----
Source/cmAddCustomCommandCommand.cxx | 5 +++++
Source/cmAddCustomTargetCommand.cxx | 7 +++++++
Tests/RunCMake/add_custom_command/RunCMakeTest.cmake | 1 +
.../SourceUsesTerminal-result.txt} | 0
.../add_custom_command/SourceUsesTerminal-stderr.txt | 4 ++++
Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake | 1 +
Tests/RunCMake/add_custom_target/RunCMakeTest.cmake | 1 +
.../UsesTerminalNoCommand-result.txt} | 0
.../add_custom_target/UsesTerminalNoCommand-stderr.txt | 4 ++++
Tests/RunCMake/add_custom_target/UsesTerminalNoCommand.cmake | 1 +
13 files changed, 39 insertions(+), 11 deletions(-)
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => add_custom_command/SourceUsesTerminal-result.txt} (100%)
create mode 100644 Tests/RunCMake/add_custom_command/SourceUsesTerminal-stderr.txt
create mode 100644 Tests/RunCMake/add_custom_command/SourceUsesTerminal.cmake
copy Tests/RunCMake/{CMP0004/CMP0004-NEW-result.txt => add_custom_target/UsesTerminalNoCommand-result.txt} (100%)
create mode 100644 Tests/RunCMake/add_custom_target/UsesTerminalNoCommand-stderr.txt
create mode 100644 Tests/RunCMake/add_custom_target/UsesTerminalNoCommand.cmake
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list