>> set(VAR_FOR_TEST "secondValue" CACHE STRING "Just for testing" FORCE)
>> find_package(CUDA)
>
> thanks for your reply, I implemented your first suggestion and this
> works perfectly.

I miss-typed that set command above.  I needed to leave outthe FORCE
flag.  This will initialize VAR_FOR_TEST to your initial value making
the set command in find_package have no effect.  This will also allow
users to change the value in the GUI, because subsequent runs of cmake
will not forcibly change the value in the cache.

set(CUDA_NVCC_FLAGS "-arch;sm_20" CACHE STRING "Flags for nvcc")
find_package(CUDA)

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