On Fri, Sep 21, 2012 at 1:44 PM, David Cole <[email protected]> wrote:
> You should avoid using FORCE in the first place.
>
> :-)
>
>
> But if you have to use it, then you should provide the type and
> documentation along with the call that uses FORCE. If you have multiple
> calls that require this information, consider using variables to eliminate
> the duplication and reference the variables from the multiple calls.

I am using FORCE to do this:

http://www.itk.org/Wiki/CMake/Tutorials/SettingVariableGroups

You can see that my set(...FORCE...) call occurs inside of a foreach:

set(${_var} OFF CACHE BOOL "test" FORCE)

I guess to use your suggestion of making a variable that stores the
docstring once and referencing it from multiple places I would have to
use the CMake map emulation for this
(http://www.cmake.org/Wiki/CMake:VariablesListsStrings#Emulating_maps)
? Sound like the right thing to do? Or is there an entirely better way
to go about this :) ?

Thanks,

David
--

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

Reply via email to