[CMake] Problem while setting variables in CMakeCache
Stefan Köhnen
stefan.khnen at googlemail.com
Tue Sep 7 13:08:46 EDT 2010
2010/9/7 Fraser Hutchison <fraser.hutchison at googlemail.com>:
> On 07/09/2010 1:54 PM, Stefan Köhnen wrote:
>>
>> 2010/9/6 Alexander Neundorf<a.neundorf-work at gmx.net>:
>>>
>>> On Monday 06 September 2010, Stefan Köhnen wrote:
>>>>
>>>> Ah, okay.
>>>>
>>>> Thanks for your fast reply.
>>>>
>>>> Is there a way to change the value in the cache?
>>>
>>> set(... FORCE)
>>>
>>> Alex
>>>
>> Hello Alex,
>>
>> thanks again for your reply. I tried to use set with FORCE but it didn't
>> work.
>>
>> My CMakeLists.txt looks like this:
>>
>> PROJECT(CMakeTest)
>>
>> SET(VAR_FOR_TEST "firstValue" CACHE STRING "Just for testing")
>>
>> set(VAR_FOR_TEST "secondValue" FORCE)
>>
> I think you want
>
> set(VAR_FOR_TEST "secondValue" CACHE STRING "Overwritten value" FORCE)
>
> All the best,
>
> Fraser.
>
>
>
>
>
>
Yes that is exactly what I was looking for.
Thank you very much. I added this and it works perfectly.
More information about the CMake
mailing list