On Jan 15, 2010, at 2:17 PM, Tyler Roscoe wrote:

On Fri, Jan 15, 2010 at 05:57:20PM +0000, Ian Scott wrote:
I have an existing large hierarchically structured code base, but I want
to extract a cut-down source code tree that only contains the source
code files necessary for a particular project. The files I don't want
are scattered through-out the code tree.

I want to be able to extract this cut-down tree on demand, including
modifications to the CMakeLists.txt (and a few other places) to remove
references to removed files. I need to do this for a variety of
licensing and quality-audit reasons. Just adding some option to my
CMakeLists.txt files to exclude files from the compilation will not be
enough.

This sounds scary.

I would solve this problem with SCM tools. For example, you could cut a branch for your pared-down project, delete the unwanted files and modify
the CMakeLists on that branch, and Bob's your uncle. This approach
requires you to use merging to keep your branch up-to-date, but to me
that seems less onerous than having a script that tweaks your build
scripts every time.

tyler

Boost solved this with a custom program called "bcp". Bcp scans the headers for #include <boost/*> and then copies the include files and implementation files into the new location. Not that I am advocating that type of solution but in the case of boost, it did work. I was able to extract out a portion of boost for what I use with my own projects which cut boost down to just a few hundred files, instead of the whole enchilada.

Cheers
___________________________________________________________
Mike Jackson                      www.bluequartz.net
Principal Software Engineer       mike.jack...@bluequartz.net
BlueQuartz Software Dayton, Ohio _______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to