ExternalProject_Add CONFIGURE_COMMAND no longer ignores empty string arguments
The behavior of ExternalProject_Add ()
has changed sometime between CMake 3.16.1 and 3.23.2, for at least the CONFIGURE_COMMAND
portion.
Given this:
ExternalProject_Add(
...
CONFIGURE_COMMAND cmake -E env "${FOO_ENV}" "${BAR_ENV}" ./configure
...
)
Previously if the BAR_ENV
variable in CONFIGURE_COMMAND
was empty, the resulting empty string would be ignored by CMake - it wouldn't even end up being passed down to the invoked configure command. In other words, cmake -E env
would not even see a double-quotes empty string.
Now, it gets an empty double-quotes, and thus fails with No such file or directory
.
Obviously the double-quotes aren't needed to begin with, and removing them solves the issue. But that wasn't necessary before.
I know the implementation of ExternalProject_Add ()
has been heavily refactored since 3.16.1, so this is an fyi in case the behavior change wasn't intended.