[CMake] cmake_parse_arguments and empty strings
Luc J. Bourhis
luc_j_bourhis at mac.com
Mon Mar 11 14:21:10 EDT 2013
Consider the following snippet
cmake_minimum_required(VERSION 2.8)
include (CMakeParseArguments)
function(foo)
set(options)
set(one_valued)
set(multi_valued)
cmake_parse_arguments("_" "${options}" "${one_valued}" "${multi_valued}"
${ARGN})
message(">>${__UNPARSED_ARGUMENTS}<<")
endfunction()
foo(ARG "")
This will print
>>ARG<<
Thus, if I was to pass ${__UNPARSED_ARGUMENTS} to another function "bar"
expecting "ARG value", that function "bar" would not work correctly because
it would not be called as bar(... ARG "" ...).
I would naively consider that a bug.
-----
--
Luc J. Bourhis
--
View this message in context: http://cmake.3232098.n2.nabble.com/cmake-parse-arguments-and-empty-strings-tp7583585.html
Sent from the CMake mailing list archive at Nabble.com.
More information about the CMake
mailing list