binary tree

https://cmake.org/cmake/help/v3.23/manual/cmake.1.html#build-a-project
What is the already-generated project binary tree?

Here is the introduction for source tree and build tree
https://cmake.org/cmake/help/v3.23/manual/cmake.1.html#introduction-to-cmake-buildsystems

If you just use the cmake command, the configuration and generation are all in one step and you don’t have to think about it.
cmake-gui allows to separate those two and configure project without generating the build system files (makefiles, ninja.build, etc). You cannot build until the generate step is done.

CMake is typically used in project mode hence the emphasis on project. This command will fail if you haven’t generated a CMake project first, so already-generated is a pre-condition. To use CMake you need 2 commands:

# the project binary directory
cd build
# Generate a Project Buildsystem
cmake ..
# Build a Project
cmake --build .

The binary directory is any directory that you chose for CMake to use when generating the project. The binary directory is also known as build tree. Personally, i would avoid calling it a binary tree since that is more commonly known as a data structure.

How can I know the build tool for these commands on windows?
I expect Visual Studio 16 2019 Generators

# the project binary directory
cd build
# Generate a Project Buildsystem
cmake ..
# Build a Project
cmake --build .

REF
https://cmake.org/cmake/help/v3.23/manual/cmake-generators.7.html#ide-build-tool-generators

The generators available for CMake depend on your machine. For example, Visual Studio must be installed in order to use it with CMake. You can see a list of available generators with

cmake --help

You would expect the one marked default in the command above. You can choose a different one when you generate the project buildsystem (see available options).

I assume you are asking how to check which one is used. Perhaps the easiest way to do that is launching cmake-gui:

cd build
cmake ..
cmake-gui .

The GUI application shows Current Generator: <your selected generator>

Q1

cmake -G "Visual Studio 16 2019"

Because I assign the -G to “Visual Studio 16 2019”, the build tool will be the “Visual Studio 16 2019” ?

Q2
Which step assigns build tool ( Generate a Project or Build a Project)?

# the project binary directory
cd build
# Generate a Project Buildsystem
cmake ..  -G "Visual Studio 16 2019"
# Build a Project
cmake --build . [-- <build-tool-options>]

Q3
How to use the parameter [-- <build-tool-options>]?
https://cmake.org/cmake/help/v3.23/manual/cmake.1.html#build-a-project

Q1: Some generators are for build systems but yes, in a more general way we are generating build tools. I would say that “Visual Studio” is the build tool here. The suffix are version details. Don’t throw stones at me if i’m wrong.

Q2:

Q3: This is out of scope for CMake. Everything following -- CMake doesn’t understand, and passes it along to said tool. Any build tool generated by CMake may have options that you want to use.

Here is a real world example for cmake --build <dir> -- <build-tool-options>:

cmake \
    -G "Unix Makefiles" \
    --build "${BINARY_DIR}" \
    -- --no-print-directory

--no-print-directory is not a CMake option. It is passed on to Make by CMake. You have to consult the documentation of your build tool for available options.

Do you have the sample command for Q3?

yes, i edited my previous post.