Extra "CACHE" options

Brad King brad.king at kitware.com
Mon Apr 14 19:19:18 CEST 2008


Hi Folks,

I just noticed that these files in kdelibs/cmake/modules:

   FindAkode.cmake
   FindFreetype.cmake
   FindGettext.cmake
   FindOpenEXR.cmake
   FindOpenEXR.cmake
   FindPCRE.cmake

contain lines like

   set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY} 
CACHE STRING "The libraries needed to use PCRE")

These should not be cache options because they just summarize 
information given by users.  The problem created by this is that if one 
of the libraries is not found then this variable stays broken even after 
the user has specified the library location.

The lines should be just

   set(PCRE_LIBRARIES ${PCRE_PCRE_LIBRARY} ${PCRE_PCREPOSIX_LIBRARY})

-Brad


More information about the Kde-buildsystem mailing list