[CMake] Source code configuration management in CMake?
Ian Scott
ian.m.scott at student.manchester.ac.uk
Wed Jan 20 12:17:26 EST 2010
Thanks for the suggestions.
I've decided to do inside our subversion repository, since I need to
maintain a branch for this project anyway. There is no point scripting
the cutting down since I only have to do it once, carefully, on the
repository branch.
Thanks again.
Ian.
Michael Jackson wrote:
>
> 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.jackson at bluequartz.net
> BlueQuartz Software Dayton, Ohio
More information about the CMake
mailing list