[Bf-committers] Cmake and CMakeCache.txt questions

Campbell Barton ideasman42 at gmail.com
Sun Mar 2 03:10:44 CET 2014


On Sun, Mar 2, 2014 at 12:46 PM, W. Nelson <indigitalspace at yahoo.com> wrote:
> Multiple instructions say do a cmake-gui ../blender and then a make from inside the build folder.  So:
>
> Does "make" from inside the build folder use the build folder CMakeCache.txt or does it use the ../blender/CMakeCache.txt?

>From the build dir, any CMakeCache.txt in the same path as
CMakeLists.txt should be removed since we don't support in-source
builds.

> Also, inversely, if you do a "make" from inside the /blender folder does it use that CMakeCache.txt file or the one in ../build?  I see that it sets up the build folder and uses it for an out of source build.

It uses the one in the build dir,

note that this just saves the hassle of manually creating a build dir,
configuring, running make, make install (similar to how scons runs all
steps at once) - so its not doing anything special other then to save
you some manual steps.

> When you do an update of the source files and do either of these makes, are your settings lost to a new CMakeCache.txt file that was just downloaded?

Nope, since CMakeCache.txt are always local to your system and never committed.

> What is the best way to manage multiple CMakeCache.txt files for multiple types of builds in the same out of source build folder?

typically you would have multiple build paths, eg:

/src/blender - git repo
/src/build_release - for cmake 'Release' builds
/src/build_debug - for cmake 'Debug' builds.

> Thanks for the clarifications.  They will help save a lot of time experimenting and digging through the scripts.
>
> JTa
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers



-- 
- Campbell


More information about the Bf-committers mailing list