Any way for cmake command to use parameters in a file?

cmake may take a lot of command parameters, for example

cmake -GNinja -DAAA=BBB ...

Any convenient way?

For example, save the parameters in a file like "cmake_cfg.debug", and call

camke --config_file=cmake_cfg.debug


Read more here: https://stackoverflow.com/questions/64951103/any-way-for-cmake-command-to-use-parameters-in-a-file

Content Attribution

This content was originally published by followait at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: