Skip to content

Help: cmake/ctest (1): put modern signature first

scivision requested to merge scivision/cmake:doco into master

recommend compact, most robust signature first for cmake and ctest. So many people are still using the multi-step pre-3.13 way of initializing a build. Rather than simply

cmake -B build
cmake --build build
ctest --test-dir build

instead of

mkdir build
cd build
cmake ..
make
ctest

What I see is that users get confused about what directory to be in and the versatility of CMake's directory commands--which are otherwise a good thing. I have found that being explicit about the directory being targeted can help users, without the need to change directory.

Edited by scivision

Merge request reports