[prev in list] [next in list] [prev in thread] [next in thread] 

List:       cmake
Subject:    Re: [CMake] Easier way to override variables
From:       Yngve Inntjore Levinsen <yngve.levinsen () gmail ! com>
Date:       2012-07-18 15:58:19
Message-ID: 3341835.uaym33VXid () yngve-chakra
[Download RAW message or body]

Hi Romain,

Have a look at the help for the function set:
$ cmake --help-command set

If I understand the documentation, this should be what you are looking for:
set(MY_VAR NEW_VALUE FORCE)

Cheers,
Yngve

On Wednesday 18. July 2012 15.49.31, Romain LEGUAY wrote:
> Hello everyone,
> 
> I don't find in any example to override a variable.
> 
> I proceed this way:
> 
> unset(MY_VAR CACHE)
> set(MY_VAR MY_NEW_VALUE)
> 
> I have many variables so I would like to have just one line to change
> just the value of the variable (not its documentation) in one line like
> this:
> 
> set(MY_VAR MY_NEW_VALUE FORCED)
> 
> Is it possible?
> 
> Thank you,
> 
> Romain
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> --
> 
> 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
--

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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic