[cmake-developers] CMakeParseArguments: Do not skip empty arguments

Daniele E. Domenichelli daniele.domenichelli at gmail.com
Wed Dec 4 09:52:16 EST 2013


On 04/12/13 14:20, Brad King wrote:
> The module can be provided as an empty file except for documentation.
> Any project including it will expect to be able to call cmake_parse_arguments
> afterwards, which they will be able to since it will be a builtin command.
> With the policy handling compatibility there is no need to keep the old
> macro implementation.  If a project has its own copy of the module it
> will simply replace the builtin command and get the original behavior.

I was assuming for some reason that the c++ command would have been
"parse_arguments" instead of "cmake_parse_arguments", probably because
the only "cmake_" commands are strictly related to cmake.

Anyway, even with the same name if someone needs the empty arguments
parsing with an older cmake version, he will have to write it from
scratch if the version in cmake is empty...

Also all the modules will either not include CMakeParseArguments and use
the system command, or (according to what I believe it's current policy)
will include it from ${CMAKE_CURRENT_LIST_DIR}, and therefore the empty
one will be included

so perhaps it could be exactly as it is now in my topic:

if(COMMAND cmake_parse_arguments)
    return()
endif()
<old implementation>


Daniele



More information about the cmake-developers mailing list