[Cmake] Resetting a variable

Bill Hoffman bill.hoffman at kitware.com
Thu May 1 08:36:15 EDT 2003


You can change a cache value with a SET(var value FORCE).   However,
this is a dangerous feature.   The problem is that cache variables
can be set by the user.    If a cmakelist file changes the value set
by a user, it can no longer be set by the user.

-Bill


At 03:41 PM 4/30/2003, Chris Scharver wrote:
>Hi,
>
>I'm cleaning up FindOpenGL.cmake for a project with which I need to easily provide changing between X11 and native OpenGL on OS X. I have made an option for enabling X11 or not, but I cannot get the OPENGL_gl_LIBRARY and OPENGL_glu_LIBRARY variables to reset based on that option. Shouldn't CMake run reconfigure using the new option value? I have the file posted on the web:
>
><http://www.evl.uic.edu/scharver/FindOpenGL.cmake>
>
>Is the fact that those variables are cached what prevents them from being reset? How can I make CMake aware that the option has changed so that it can update variables dependent upon that option? I'm using cvs CMake and ccmake for now. Any help would be appreciated.
>
>Thanks,
>Chris
>--
>Chris Scharver
>Electronic Visualization Laboratory
>The University of Illinois at Chicago
>Ph: 312-996-3002   FAX: 312-413-7585
><http://www.evl.uic.edu/scharver/>
>_______________________________________________
>Cmake mailing list
>Cmake at public.kitware.com
>http://public.kitware.com/mailman/listinfo/cmake 






More information about the CMake mailing list