diff options
author | Brad King <brad.king@kitware.com> | 2008-12-18 18:36:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-12-18 18:36:58 (GMT) |
commit | 0a83aa6f5700b424830136ebd2bf285e8ce6b56d (patch) | |
tree | 2b72bf2efbf0412092d64c9e061d9158f072a7c1 /Tests | |
parent | adb6bf82b0c780f9fbf36ef5bebaa38d4e7eb5ae (diff) | |
download | CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.zip CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.tar.gz CMake-0a83aa6f5700b424830136ebd2bf285e8ce6b56d.tar.bz2 |
BUG: Fix windows command line escape for empty arg
On Windows the KWSys System package generates escapes for command-line
arguments. This fix enables quoting of the empty string as an argument.
This also adds a test to pass an empty argument to a custom command.
Diffstat (limited to 'Tests')
-rw-r--r-- | Tests/CustomCommand/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Tests/CustomCommand/CMakeLists.txt b/Tests/CustomCommand/CMakeLists.txt index 8ac1f12..ffe0523 100644 --- a/Tests/CustomCommand/CMakeLists.txt +++ b/Tests/CustomCommand/CMakeLists.txt @@ -346,7 +346,7 @@ ENDIF(NOT MINGW) # | < > << >> &> 2>&1 1>&2 # to allow custom commands to perform redirection. -FOREACH(arg ${CHECK_ARGS}) +FOREACH(arg ${CHECK_ARGS} "") SET(ARG "${arg}") STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ARG "${ARG}") STRING(REGEX REPLACE "\"" "\\\\\"" ARG "${ARG}") @@ -367,7 +367,7 @@ ADD_CUSTOM_COMMAND( COMMAND ${CMAKE_COMMAND} -DMARK_FILE=${CMAKE_CURRENT_BINARY_DIR}/check_mark.txt -P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line - ${CHECK_ARGS} + ${CHECK_ARGS} "" VERBATIM COMMENT "Checking custom command line escapes (single'quote)" ) @@ -377,7 +377,7 @@ ADD_CUSTOM_TARGET(do_check_command_line ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/command_line_check COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes" COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line - ${CHECK_ARGS} + ${CHECK_ARGS} "" VERBATIM COMMENT "Checking custom target command line escapes ($dollar-signs$)" ) |