[CMake] disable global package caching mechanims?

Michael Wild themiwi at gmail.com
Wed Oct 5 10:38:09 EDT 2011


On Wed 05 Oct 2011 04:22:27 PM CEST, Thomas Wolf wrote:
> Hi,
>
> is there a way to disable the global caching mechanism of cmake?
> I mean the caching where cmake stores where a certain
> software package can be /was found once successfully built.
>
> I have a  closed standalone build (suitable for e.g. a buildserver and
> automatic testing) and want to make sure that it is using *exactly*
> what it is building itself in that makefile run.
>
> Debugging the makefiles, i have some problems because everytime
> something goes wrong, the machine finds the required libraries
> somewhere else (as they are present at several locations and cmake
> apparently cached that).
>
> That behaviour completly defeats the purpose of having a monolithic
> build with a testable software release.
>
> Is there a switch of some kind?
>
>
> Regards,
> Thomas

CMake only caches this kind of information in the CMakeCache.txt file 
in the build tree. You might want to take a look at the -C option of 
CMake. Alternatively, you can also try to play around with the 
CMAKE_SYSTEM_PREFIX and CMAKE_SYSTEM_*_PATH variables as documented the 
man-page.

Michael


More information about the CMake mailing list