--config since 3.20

A few days ago I updated from 3.19 to 3.20 and my project failed to build because I use ExternalProject_Add and pass --config to subrojects, but --config has gone. For example, if we run cmake this way:

$ cmake --config

It will first complain about unknown option:

CMake Error: Unknown argument --config
CMake Error: Run 'cmake --help' for all supported options.

Latest documentation and release notes say nothing about --config removal.

What should I use instead of it?

--config never existed like that (a standalone flag). CMake prior to 3.20 pretty much ignored unknown arguments and the command line parser has been changed to actually detect such issues rather than silently accepting them.

1 Like