title: Simple way to forward a no-value function parameter in CMake
body: <p>I have two CMake functions (let's call them <code>inner</code> and <code>outer</code>) which use <code>cmake_parse_arguments</code> with the same option (no-value parameter) <code>XXX</code> and some other parameters, so they look like</p>
  <pre><code>function(inner)
      set(prefix ARG)
      set(noValues XXX)
      set(singleValues ...)
      set(multiValues ...)
      cmake_parse_arguments(${prefix}
                            &quot;${noValues}&quot;
                            &quot;${singleValues}&quot;
                            &quot;${multiValues}&quot;
                            ${ARGN})
  ...
  endfunction()
  
  function(outer)
      set(prefix ARG)
      set(noValues XXX)
      set(singleValues ...)
      set(multiValues ...)
      cmake_parse_arguments(${prefix}
                            &quot;${noValues}&quot;
                            &quot;${singleValues}&quot;
                            &quot;${multiValues}&quot;
                            ${ARGN})
  ...
      inner(
          $&lt;$&lt;BOOL:${ARG_XXX}&gt;:XXX&gt;
          ...)
  endfunction()
  </code></pre>
  <p>The intention is that if <code>XXX</code> is set when calling <code>outer</code>, it will be passed through to <code>inner</code>. But this doesn't seem to work; if I add</p>
  <pre><code># in outer
      message(&quot;in outer, FILE=${ARG_FILE}, XXX=${ARG_XXX}&quot;)
  
  # in inner
      message(&quot;in outer, FILE=${ARG_FILE}, XXX=${ARG_XXX}&quot;)
  </code></pre>
  <p>(<code>FILE</code> is another argument getting passed through, but it's a mandatory single-value argument, so it's just <code>FILE &quot;${ARG_FILE}</code> which works well) I see</p>
  <pre><code>in outer, FILE=abc.def, XXX=TRUE
  in inner, FILE=abc.def, XXX=FALSE
  </code></pre>
  <p>Why doesn't this work as I expect and what is the correct way to do it?</p>
  <p>Of course, I could do</p>
  <pre><code>if (ARG_XXX)
      inner(XXX ...all the other arguments...)
  else()
      inner(...all the other arguments...)
  endif()
  </code></pre>
  <p>but I'm hoping that's not necessary given the actual codebase doesn't just have 2 layers with 1 function each...</p>
  <p>The CMake version is 3.15.5 but the answer must work on 3.10.2 and later.</p>