diff options
-rw-r--r-- | Help/command/add_custom_command.rst | 3 | ||||
-rw-r--r-- | Help/policy/CMP0175.rst | 4 | ||||
-rw-r--r-- | Source/cmAddCustomCommandCommand.cxx | 1 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/CMP0175-NEW-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/CMP0175-WARN-stderr.txt | 2 | ||||
-rw-r--r-- | Tests/RunCMake/add_custom_command/CMP0175.cmake | 5 |
6 files changed, 10 insertions, 7 deletions
diff --git a/Help/command/add_custom_command.rst b/Help/command/add_custom_command.rst index 122bb4e..6c2d693 100644 --- a/Help/command/add_custom_command.rst +++ b/Help/command/add_custom_command.rst @@ -599,7 +599,8 @@ target is already built, the command will not execute. [WORKING_DIRECTORY dir] [COMMENT comment] [VERBATIM] - [COMMAND_EXPAND_LISTS]) + [COMMAND_EXPAND_LISTS] + [USES_TERMINAL]) This defines a new command that will be associated with building the specified ``<target>``. The ``<target>`` must be defined in the current diff --git a/Help/policy/CMP0175.rst b/Help/policy/CMP0175.rst index f2c372d..a71aadf 100644 --- a/Help/policy/CMP0175.rst +++ b/Help/policy/CMP0175.rst @@ -24,8 +24,8 @@ following as errors that previously went unreported: ``POST_BUILD`` to be given. Previously, if none were given, ``POST_BUILD`` was assumed, or if multiple keywords were given, the last one was used. * The ``TARGET`` form does not accept ``DEPENDS``, ``DEPENDS_EXPLICIT_ONLY``, - ``DEPFILE``, ``IMPLICIT_DEPENDS``, ``MAIN_DEPENDENCY``, ``JOB_POOL``, - ``JOB_SERVER_AWARE``, or ``USES_TERMINAL`` keywords. + ``DEPFILE``, ``IMPLICIT_DEPENDS``, ``MAIN_DEPENDENCY``, ``JOB_POOL``, or + ``JOB_SERVER_AWARE`` keywords. * The ``TARGET`` form now requires at least one ``COMMAND`` to be given. * If a keyword expects a value to be given after it, but no value is provided, that was previously treated as though the keyword was not given at all. diff --git a/Source/cmAddCustomCommandCommand.cxx b/Source/cmAddCustomCommandCommand.cxx index 885094d..7311de8 100644 --- a/Source/cmAddCustomCommandCommand.cxx +++ b/Source/cmAddCustomCommandCommand.cxx @@ -155,6 +155,7 @@ bool cmAddCustomCommandCommand(std::vector<std::string> const& args, keyPRE_BUILD, keyPRE_LINK, keyTARGET, + keyUSES_TERMINAL, keyVERBATIM, keyWORKING_DIRECTORY }; diff --git a/Tests/RunCMake/add_custom_command/CMP0175-NEW-stderr.txt b/Tests/RunCMake/add_custom_command/CMP0175-NEW-stderr.txt index c356971..8b02f7c 100644 --- a/Tests/RunCMake/add_custom_command/CMP0175-NEW-stderr.txt +++ b/Tests/RunCMake/add_custom_command/CMP0175-NEW-stderr.txt @@ -9,7 +9,7 @@ Call Stack \(most recent call first\): CMake Error at CMP0175\.cmake:[0-9]+ \(add_custom_command\): The following keywords are not supported when using - add_custom_command\(TARGET\): IMPLICIT_DEPENDS, USES_TERMINAL + add_custom_command\(TARGET\): IMPLICIT_DEPENDS Call Stack \(most recent call first\): CMP0175-NEW\.cmake:2 \(include\) CMakeLists\.txt:3 \(include\) diff --git a/Tests/RunCMake/add_custom_command/CMP0175-WARN-stderr.txt b/Tests/RunCMake/add_custom_command/CMP0175-WARN-stderr.txt index f49dd73..23b989e 100644 --- a/Tests/RunCMake/add_custom_command/CMP0175-WARN-stderr.txt +++ b/Tests/RunCMake/add_custom_command/CMP0175-WARN-stderr.txt @@ -13,7 +13,7 @@ This warning is for project developers\. Use -Wno-dev to suppress it\. CMake Warning \(dev\) at CMP0175\.cmake:[0-9]+ \(add_custom_command\): The following keywords are not supported when using - add_custom_command\(TARGET\): IMPLICIT_DEPENDS, USES_TERMINAL\. + add_custom_command\(TARGET\): IMPLICIT_DEPENDS\. Policy CMP0175 is not set: add_custom_command\(\) rejects invalid arguments\. Run "cmake --help-policy CMP0175" for policy details\. Use the cmake_policy diff --git a/Tests/RunCMake/add_custom_command/CMP0175.cmake b/Tests/RunCMake/add_custom_command/CMP0175.cmake index 0c20f4e..fa877e7 100644 --- a/Tests/RunCMake/add_custom_command/CMP0175.cmake +++ b/Tests/RunCMake/add_custom_command/CMP0175.cmake @@ -24,14 +24,15 @@ add_custom_command(TARGET main #OUTPUT # Other checks will fail before the CMP0175 check #OUTPUTS # Special case, not a documented keyword (used for deprecated form) #SOURCE # Old signature, special handling makes it hard to check - #USES_TERMINAL ) add_custom_command(TARGET main POST_BUILD COMMAND ${CMAKE_COMMAND} -E true # Has to be tested separately due to separate check for clash with DEPFILE IMPLICIT_DEPENDS valueDoesNotMatterHere - # Has to be tested separately due to separate check for clash with JOB_POOL + # Has to be tested separately due to separate check for clash with JOB_POOL. + # This one is supported, but was erroneously rejected in the 3.31.0 release. + # We keep this here to verify the fix for that regression. USES_TERMINAL NO ) |