Executing Builds - Cmake
CMake can be used to generate SW projects with various types of build systems.In Mac environments, the common build systems are Xcode, Ninja and make.
CMake and Xcode projects
If you generate your Xcode project using CMake (with the -G Xcode option), you should follow the instructions in Executing Builds - Xcode.
CMake and make or Ninja projects
If you generate your make or Ninja project using CMake (with the -G Ninja or -G "Unix Makefiles" options), you should use the following method.
When generating the project, prepend the cmake command with ib_console, for example:
cmake --toolchain /opt/incredibuild/toolchain.cmake -S opencv -B bld -G Ninja
Then run the build, again prepending the cmake command with ib_console, for example:
ib_console cmake --build bld_folder
Note: Make sure your CMakeFiles.txt does not use the CMAKE_CXX_COMPILER_LAUNCHER or CMAKE_C_COMPILER_LAUNCHER options (e.g. when using ccache).
You can add additional command line options to the ib_console command to use Build Cache, add a build caption, and more.