[CMake] [PATCH] make target helper directories hidden

Brad King brad.king at kitware.com
Thu Jul 7 10:24:57 EDT 2005


Ken Martin wrote:
> Hi Alex,
> 
> I applied the patch. In the long run I think we need to put all this CMake
> junk (files and dirs) into a directory per source directory so that we don't
> pollute the tree as much as we currently do. But that isn't at the top of
> the list.

I've just replaced this change with a more general solution.  Instead of 
doing

SET(CMAKE_HIDE_TARGET_DIRS 1)

you can instead do

SET(CMAKE_TARGET_DIR_PREFIX ".")

This approach has several advantages:

1.) It is useful on Windows to set a prefix that will at least group all 
the directories together since they cannot be hidden by changing the name.

2.) It still allows the directories to be hidden on UNIX.

3.) The prefix can have a slash in it so it can be used to group all 
target directories under a single directory (per source directory):

SET(CMAKE_TARGET_DIR_PREFIX ".cmakedirs/")

>>-----Original Message-----
>>From: cmake-bounces+ken.martin=kitware.com at cmake.org [mailto:cmake-
>>bounces+ken.martin=kitware.com at cmake.org] On Behalf Of Alexander Neundorf
>>Sent: Wednesday, July 06, 2005 4:03 PM
>>To: cmake at www.cmake.org
>>Subject: [CMake] [PATCH] make target helper directories hidden
>>
>>Hi,
>>
>>with the new makefile generator and compiling in-source, there are a lot
>>of
>>directories created during building (the *.dir directories).
>>The attached patch introduces a new variable CMAKE_HIDE_TARGET_DIRS. When
>>set to ON, these directories will be hidden (i.e. prefixed with a ".").
>>
>>What do you think ?
>>Ok to apply ?
>>
>>Bye
>>Alex
>>
>>--
>>Weitersagen: GMX DSL-Flatrates mit Tempo-Garantie!
>>Ab 4,99 Euro/Monat: http://www.gmx.net/de/go/dsl
> 
> 
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list