FindBISON: Add COMMAND_EXPAND_LISTS to remove empty arguments

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 GNU bison command-line tool errors out
with `/usr/bin/bison: extra operand` error. This removes empty arguments
from the created bison command.
This commit is contained in:
Peter Kokot
2024-10-20 15:36:17 +02:00
parent 60ba3b3038
commit 3ffc8a6b61

View File

@@ -281,7 +281,8 @@ if(BISON_EXECUTABLE)
VERBATIM
DEPENDS ${_BisonInput}
COMMENT "[BISON][${Name}] Building parser with bison ${BISON_VERSION}"
WORKING_DIRECTORY ${_BISON_WORKING_DIRECTORY})
WORKING_DIRECTORY ${_BISON_WORKING_DIRECTORY}
COMMAND_EXPAND_LISTS)
unset(_BISON_WORKING_DIRECTORY)