title: What happened to CMake's --target argument?
body: <p>With CMake version 3.19.2 I can use <code>--target</code> argument to build specific targets, instead of <code>all</code>.
  For example <code>--target tests</code> to build tests.
  However, with CMake 3.22.1 I'm getting an error like this:</p>
  <pre><code>CMake Error: Unknown argument --target
  CMake Error: Run 'cmake --help' for all supported options.
  </code></pre>
  <p>You can see the manual of CMake here:
  <a href="https://cmake.org/cmake/help/latest/manual/cmake.1.html" rel="nofollow noreferrer">https://cmake.org/cmake/help/latest/manual/cmake.1.html</a> <br />
  (There is a drop-down list for version selection)</p>
  <p>It describes the <code>--target</code> argument, and It doesn't seem any different from what it was earlier. Nonetheless, after switching from 3.19.2 to 3.22.1 it doesn't let me use <code>--target</code>.</p>
  <p>@EDIT thank you for your feedback, here's what I use:</p>
  <pre><code>cmake -G Ninja -DCROSS_COMPILER_PREFIX=&lt;some_prefix&gt; -Dsomeothervariables=1 --target tests $directory_with_cmake_project
  </code></pre>
  <p>It works with 3.19.2, but executing the same thing with cmake 3.22.1 causes the error.
  I expect that the order of providing <code>-G Ninja</code>, variables, target directory and <code>--target</code> matters, but I haven't managed to get it to work in any order I could think of.</p>