Re: [CMake] Best practice for configuration-dependent defaults?

2018-08-24 Thread Petr Kmoch
Hi Sam, it seems to me that your user-facing option is not actually Boolean, but tri-state: On vs. Off vs. Use_default. So I would represent it accordingly: present the user with a string variable (with suitable STRINGS property https://cmake.org/cmake/help/latest/prop_cache/STRINGS.html), and

[CMake] Best practice for configuration-dependent defaults?

2018-08-17 Thread Sam Edwards
Hi all! I have a project with some options that have different defaults depending on the configuration used to build the project. For example, support for a certain (easy to support, but relatively uncommon) file format should be on by default, except when building in the MinSizeRel