On Tue, Sep 15, 2009 at 12:37:27PM -0600, James C. Sutherland wrote:
> A related question: If I set CMAKE_INSTALL_PREFIX in my
> CMakeLists.txt file
> >set( CMAKE_INSTALL_PREFIX
> > ${CMAKE_CURRENT_BINARY_DIR}
> > )
> and then run ccmake, I find that the CMAKE_INSTALL_PREFIX variable is
> set to /usr/local rather than the binary directory. Is this a bug? I
There is a world of difference between set() and set(... CACHE ...).
Consult the docs.
What you've done above is set a variable that has nothing to do
with the cache, and in fact will override whatever is in the cache.
Hence:
> > message( STATUS "Files will be installed to: " $
> >{CMAKE_INSTALL_PREFIX} )
>
> then it reflects the correct directory, but the CMakeCache.txt file
In a project configured the way you show in this email, your manually
set variable will always be used; the cache variable will always be
ignored.
tyler
_______________________________________________
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