2010/9/6 Alexander Neundorf <a.neundorf-w...@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)

MESSAGE (${VAR_FOR_TEST})


I think you wanted me to use FORCE in the first set command but I need
to change the variable after it is first set.

Maybe some more information on what I am trying to do will be helpful.

We use the FindCUDA Script, now we try to set the CUDA_NVCC_FLAGS
variable depending on the hardware that is used, we have different
GPUs with different Computing Capalities (sm_11 and sm_13).

The variable CUDA_NVCC_FLAGS is set in the FindCUDA Script (
set(CUDA_NVCC_FLAGS "" CACHE STRING "Semi-colon delimit multiple
arguments.") ), I thought it would be possible to set this variable
automatically depending on which type of GPU is avaible. We already
added code to determine the type of GPU and to build the flags
accordingly to our main CMakeLists.txt, but I am not able to store the
flags in CUDA_NVCC_FLAGS.

The question is how can I change the value of CUDA_NVCC_FLAGS, so that
the new value is stored in the cache.


Stefan
_______________________________________________
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