[CMake] Clearing all cmake files

Andreas Pakulat apaku at gmx.de
Tue Sep 9 12:29:25 EDT 2008


On 09.09.08 17:14:21, Wookey wrote:
> On 2008-09-09 10:42 -0400, Robert Kubrick wrote:
> > 
> > No you're right, the CMakeLists.txt is the only file I need to keep.  
> > In facts I store that under source control.
> > 
> > I think it would be useful to have a command to clobber the whole  
> > cmake hierarchy for when you need to prepare a distribution, change  
> > the compiler settings or clear some conflicts in the build tree. It  
> > does happen, especially during the project initial setup.
> 
> I'd second this. I had huge problems getting cross-building to work
> until I realised that it was vital to delete CMakeCache.txt after
> every change. Without doing that any changes you make to CmakeLists.txt
> or your TOOLCHAIN file (or FIND modules) simply don't make any difference.
> 
> I don't understand why Cmake doesn't have an implicit dependency of
> CMakeCache on CMakeLists.txt and the file specified by -DCMAKE_TOOLCHAIN 

No, that would be wrong. You can do a lot of modifications to the
CMakeLists.txt file without needing to update the Cache at all. Think
for example about adding files, removing directories and more.

Your use-case actually sounds as if what you really want are multiple
builddirectories for the different toolchains you want to use.

Granted there's not much that can be done when a FindXXX.cmake file
changes and you need that update.

Andreas

-- 
You will always have good luck in your personal affairs.


More information about the CMake mailing list