Reputation: 8238
All the build hierarchy of my project is based on ExternalProject
with --config
option. A few days ago I updated to CMake 3.20, and now --config
is gone:
$ cmake --config
CMake Error: Unknown argument --config
CMake Error: Run 'cmake --help' for all supported options.
While the documentation still advises to use it, and the Release notes is also silent about the option.
What should I use instead of --config
?
Upvotes: 4
Views: 7160
Reputation: 153
You should use for configure:
cmake -S . -D CMAKE_BUILD_TYPE=Release
CMAKE_BUILD_TYPE
will be ignored at configure
And for build:
cmake --build . --config Release
Based on https://stackoverflow.com/a/64719718 I don't understand why docs ignored this movement
Upvotes: 4
Reputation: 469
OK I had the same problem on macOS with the XCode generator.
Turns out all I was missing was the --build
command.
i.e. instead of:
cmake . --config Debug
I have to type:
cmake --build . --config Debug
Upvotes: 2