The process of using the cmake command line to accomplish incremental compilation involves the following steps:
cmake -DCMAKE_BUILD_TYPE=Release .
--target
flag followed by the target you want to build. For example:cmake --build . --target mytarget
--target
flag to build only the changed files:cmake --build . --target mytarget
Note: The --target
flag can also be used with other options, such as --clean-first
to clean the build directory before building or --parallel
to enable parallel builds.
Asked: 2021-08-17 11:00:00 +0000
Seen: 9 times
Last updated: Apr 15 '21