[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.44 1.45

cmake-commits at cmake.org cmake-commits at cmake.org
Thu Dec 18 13:37:00 EST 2008


Update of /cvsroot/CMake/CMake/Tests/CustomCommand
In directory public:/mounts/ram/cvs-serv12824/Tests/CustomCommand

Modified Files:
	CMakeLists.txt 
Log Message:
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.


Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/CustomCommand/CMakeLists.txt,v
retrieving revision 1.44
retrieving revision 1.45
diff -C 2 -d -r1.44 -r1.45
*** CMakeLists.txt	9 Oct 2008 15:01:23 -0000	1.44
--- CMakeLists.txt	18 Dec 2008 18:36:58 -0000	1.45
***************
*** 347,351 ****
  # to allow custom commands to perform redirection.
  
! FOREACH(arg ${CHECK_ARGS})
    SET(ARG "${arg}")
    STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ARG "${ARG}")
--- 347,351 ----
  # to allow custom commands to perform redirection.
  
! FOREACH(arg ${CHECK_ARGS} "")
    SET(ARG "${arg}")
    STRING(REGEX REPLACE "\\\\" "\\\\\\\\" ARG "${ARG}")
***************
*** 368,372 ****
    -P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake
    COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
!   ${CHECK_ARGS}
    VERBATIM
    COMMENT "Checking custom command line escapes (single'quote)"
--- 368,372 ----
    -P ${CMAKE_CURRENT_SOURCE_DIR}/check_mark.cmake
    COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
!   ${CHECK_ARGS} ""
    VERBATIM
    COMMENT "Checking custom command line escapes (single'quote)"
***************
*** 378,382 ****
    COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes"
    COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
!   ${CHECK_ARGS}
    VERBATIM
    COMMENT "Checking custom target command line escapes ($dollar-signs$)"
--- 378,382 ----
    COMMAND ${CMAKE_COMMAND} -E echo "Checking custom target command escapes"
    COMMAND ${EXECUTABLE_OUTPUT_PATH}/${CMAKE_CFG_INTDIR}/check_command_line
!   ${CHECK_ARGS} ""
    VERBATIM
    COMMENT "Checking custom target command line escapes ($dollar-signs$)"



More information about the Cmake-commits mailing list