[CMake] How to FORCE an OPTION?

Philip Lowman philip at yhbt.com
Tue Jul 7 07:22:19 EDT 2009


You could write a function called force_option() or something like that that
simply calls set()

On Tue, Jul 7, 2009 at 4:30 AM, Marcel Loose <loose at astron.nl> wrote:

> Hi all,
>
> Is there a way to FORCE an OPTION, other than using
>
>  set(VAR <value> CACHE BOOL "docstring" FORCE)
>
> The reason I'm asking is that I'm using two files that preset a number
> of CMake options. The first contains generic settings; the second,
> host-specific, may override these generic settings.
>
> Since these files can be modified by end-users (i.e. software developers
> not necessarily proficient with CMake) I would like to keep the syntax
> as easy as possible.
>
> Something like
>
>  option(VAR [docstring] <value> FORCE)
>
> would be nice.
>
> Best regards,
> Marcel Loose.
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the CMake FAQ at:
> http://www.cmake.org/Wiki/CMake_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.cmake.org/mailman/listinfo/cmake
>



-- 
Philip Lowman
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090707/7f9e0a5f/attachment.htm>


More information about the CMake mailing list