mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
Our custom command generation logic assumes that all command lines have
at least `argv0`. In `add_custom_{command,target}` we already check
that at least a `COMMAND` was given, but using `COMMAND_EXPAND_LISTS` in
combination with a generator expression that expands to an empty string
may produce an empty command line. In this case simply add an empty
string as a command to maintain our internal invariant.
Fixes: #17993
2 lines
63 B
CMake
2 lines
63 B
CMake
add_custom_target(EmptyCustom COMMAND "" COMMAND_EXPAND_LISTS)
|