mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-02 20:00:38 -06:00
FindFlex: Add COMMAND_EXPAND_LISTS to remove empty arguments
This is a follow-up of 3ffc8a6b61
When using generator expressions in the COMPILE_FLAGS argument, and the
generator expression expands to an empty string, command gets an empty
argument with double quotes where flex command-line tool errors out
with `/usr/bin/flex: can't open` error. This removes empty arguments
from the created flex command.
This commit is contained in:
@@ -217,7 +217,8 @@ if(FLEX_EXECUTABLE)
|
||||
VERBATIM
|
||||
DEPENDS ${_flex_INPUT}
|
||||
COMMENT "[FLEX][${Name}] Building scanner with ${_flex_EXE_NAME_WE} ${FLEX_VERSION}"
|
||||
WORKING_DIRECTORY ${_flex_WORKING_DIR})
|
||||
WORKING_DIRECTORY ${_flex_WORKING_DIR}
|
||||
COMMAND_EXPAND_LISTS)
|
||||
|
||||
set(FLEX_${Name}_DEFINED TRUE)
|
||||
set(FLEX_${Name}_OUTPUTS ${_flex_TARGET_OUTPUTS})
|
||||
|
||||
Reference in New Issue
Block a user