ctest presets and --build-and-test

Kamil Kisiel
Tue, 21 Feb 2023 21:34:23 +0000
Usage

I’m trying to use the --build-and-test option with ctest in conjunction with presets. I’m using Ninja Multi-Config as my generator. My test presets include both the configurePreset and configuration fields yet when I try to use ctest --build-and-test --preset=mypreset I still get:

--build-and-test requires that the generator be provided using the --build-generator command line option.

It seems based on the information in the preset that ctest should be able to figure this out on its own, any reason it doesn’t?

4 posts - 2 participants