cmake how to make the build final execute file to another directory

Allow me:
https://cmake.org/cmake/help/latest/guide/tutorial/A%20Basic%20Starting%20Point.html

current directory: /home/jian/helloc/cmake_begin/step1
then

cd …/step1

then it will return the same directory.

Current CMakeLists.txt

cmake_minimum_required(VERSION 3.10)

project(tutorial)

add_executable(tutorial101 tutorial.c)

cmake ../step1
cmake --build .

then It will generate a executable file then I do 

 ./tutorial101

will print out hello world.

I think you’re looking for CMAKE_RUNTIME_OUTPUT_DIRECTORY.