diff options
author | Brad King <brad.king@kitware.com> | 2016-04-20 17:19:31 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2016-04-20 17:19:31 (GMT) |
commit | f56a0ddd289827b5daca473b6a3e46efa5c8f15b (patch) | |
tree | 87033b9b746a2f9556642630e6da2fcedb387990 /Modules | |
parent | 3d13492eac641f755ad13291560b91113c2a61d9 (diff) | |
download | CMake-f56a0ddd289827b5daca473b6a3e46efa5c8f15b.zip CMake-f56a0ddd289827b5daca473b6a3e46efa5c8f15b.tar.gz CMake-f56a0ddd289827b5daca473b6a3e46efa5c8f15b.tar.bz2 |
FindBISON: Fix BISON_TARGET macro for special characters in path (#16072)
Use the VERBATIM option to add_custom_command so that the command is
escaped correctly.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindBISON.cmake | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/FindBISON.cmake b/Modules/FindBISON.cmake index 7d81276..69293f5 100644 --- a/Modules/FindBISON.cmake +++ b/Modules/FindBISON.cmake @@ -125,10 +125,10 @@ if(BISON_EXECUTABLE) get_filename_component(BISON_TARGET_output_path "${BisonOutput}" PATH) get_filename_component(BISON_TARGET_output_name "${BisonOutput}" NAME_WE) add_custom_command(OUTPUT ${filename} - COMMAND ${CMAKE_COMMAND} - ARGS -E copy + COMMAND ${CMAKE_COMMAND} -E copy "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output" "${filename}" + VERBATIM DEPENDS "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output" COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}" @@ -201,8 +201,8 @@ if(BISON_EXECUTABLE) add_custom_command(OUTPUT ${BISON_TARGET_outputs} ${BISON_TARGET_extraoutputs} - COMMAND ${BISON_EXECUTABLE} - ARGS ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput} + COMMAND ${BISON_EXECUTABLE} ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput} + VERBATIM DEPENDS ${BisonInput} COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) |