[CMake] Adding support to ignore build directory for TimeMachine Backups (OS X 10.5 and above)

Michael Jackson mike.jackson at bluequartz.net
Mon Nov 30 12:37:19 EST 2009


I was wanting to hack around a bit in the CMake code based in order to  
add in a "feature" to have Build directories ignored by TimeMachine on  
OS X 10.5 and above. Xcode seems to do this automatically for you but  
if you use any of the other generators then you are out of luck. I  
realize I _could_ manually add each and every build directory using  
the TimeMachine System preference I thought it might be interesting to  
see what happens if CMake could automatically add this support.

  The couple of things that I figure I would need to add are:

CMAKE_OSX_EXCLUDE_BUILD_FROM_TIMEMACHINE as a cmake variable in the  
same way that CMAKE_OSX_ARCHITECTURES is added in the CMake.darwin file

I'll also need to add a bit of Carbon code to CMake itself:

<http://developer.apple.com/leopard/overview/apptech.html>
NSURL *url = [NSURL fileURLWithPath:@"/path/to/file"];
CSBackupSetItemExcluded((CFURLRef)url, true, false);

I just am not sure _where_ I might add that code? If some one could  
point me in the right direction that would be great. I'll report my  
results back to the list if anyone is interested and/or start a  
feature request on the bug tracker.
________________________________________________________
Mike Jackson                  mike.jackson at bluequartz.net
BlueQuartz Software                    www.bluequartz.net
Principal Software Engineer                  Dayton, Ohio



More information about the CMake mailing list