[cmake-developers] cmake-file-api and CTest

Brad King brad.king at kitware.com
Mon Jul 8 11:50:01 EDT 2019


On 7/7/19 5:04 AM, Nagy-Egri Máté Ferenc via cmake-developers wrote:
> I am trying to cook a CTest back-end to the Test Explorer UI extension
> for VS Code as a summer project and I thought of using the new cmake-file-api
> for it.

CTest's model of the test suite is distinct from CMake's model and may
be a superset of tests.  CMake 3.14 (which introduced fileapi) also
comes with a new ctest option for this.  Run

    ctest --show-only=json-v1 -C Debug

in a build tree to get a machine-readable spec of the tests.  The
`-C Debug` argument can be used to specify the configuration for
which the set of tests is to be reported.

See documentation here:

    https://cmake.org/cmake/help/v3.15/manual/ctest.1.html#show-as-json-object-model

-Brad


More information about the cmake-developers mailing list