CMake: Override sub-project option once and for all

To set an option (foo) of a sub-project permanently you need to add the following code: set(foo "bar" CACHE STRING "overrides option foo of sub" FORCE) in case you want the option configurable by the including project you should define an option with the same name.

Leave a Reply

Your email address will not be published. Required fields are marked *