Merge topic 'fix-bison-flex-command-escaping'

fd73bb60 Help: Add notes for topic 'fix-bison-flex-command-escaping'
f56a0ddd FindBISON: Fix BISON_TARGET macro for special characters in path (#16072)
3d13492e FindFLEX: Fix FLEX_TARGET macro for special characters in path (#16072)
This commit is contained in:
Brad King 2016-04-22 09:02:08 -04:00 committed by CMake Topic Stage
commit eadc6db82e
3 changed files with 18 additions and 6 deletions

View File

@ -0,0 +1,12 @@
fix-bison-flex-command-escaping
-------------------------------
* The :module:`FindBISON` module ``BISON_TARGET`` macro now supports
special characters by passing the ``VERBATIM`` option to internal
:command:`add_custom_command` calls. This may break clients that
added escaping manually to work around the bug.
* The :module:`FindFLEX` module ``FLEX_TARGET`` macro now supports
special characters by passing the ``VERBATIM`` option to internal
:command:`add_custom_command` calls. This may break clients that
added escaping manually to work around the bug.

View File

@ -125,10 +125,10 @@ if(BISON_EXECUTABLE)
get_filename_component(BISON_TARGET_output_path "${BisonOutput}" PATH) get_filename_component(BISON_TARGET_output_path "${BisonOutput}" PATH)
get_filename_component(BISON_TARGET_output_name "${BisonOutput}" NAME_WE) get_filename_component(BISON_TARGET_output_name "${BisonOutput}" NAME_WE)
add_custom_command(OUTPUT ${filename} add_custom_command(OUTPUT ${filename}
COMMAND ${CMAKE_COMMAND} COMMAND ${CMAKE_COMMAND} -E copy
ARGS -E copy
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output" "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
"${filename}" "${filename}"
VERBATIM
DEPENDS DEPENDS
"${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output" "${BISON_TARGET_output_path}/${BISON_TARGET_output_name}.output"
COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}" COMMENT "[BISON][${Name}] Copying bison verbose table to ${filename}"
@ -201,8 +201,8 @@ if(BISON_EXECUTABLE)
add_custom_command(OUTPUT ${BISON_TARGET_outputs} add_custom_command(OUTPUT ${BISON_TARGET_outputs}
${BISON_TARGET_extraoutputs} ${BISON_TARGET_extraoutputs}
COMMAND ${BISON_EXECUTABLE} COMMAND ${BISON_EXECUTABLE} ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput}
ARGS ${BISON_TARGET_cmdopt} -o ${BisonOutput} ${BisonInput} VERBATIM
DEPENDS ${BisonInput} DEPENDS ${BisonInput}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}" COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})

View File

@ -185,8 +185,8 @@ if(FLEX_EXECUTABLE)
endif() endif()
add_custom_command(OUTPUT ${FLEX_TARGET_outputs} add_custom_command(OUTPUT ${FLEX_TARGET_outputs}
COMMAND ${FLEX_EXECUTABLE} COMMAND ${FLEX_EXECUTABLE} ${FLEX_EXECUTABLE_opts} -o${Output} ${Input}
ARGS ${FLEX_EXECUTABLE_opts} -o${Output} ${Input} VERBATIM
DEPENDS ${Input} DEPENDS ${Input}
COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}" COMMENT "[FLEX][${Name}] Building scanner with flex ${FLEX_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})