[CMake] Creating projects with no source files?

Eric Noulard eric.noulard at gmail.com
Sun Jan 18 06:37:09 EST 2009


2009/1/18 Andreas Pakulat <apaku at gmx.de>:
> On 17.01.09 23:48:42, Robert Dailey wrote:
>> Hi,
>>
>> I have a sort of interesting project design that I'm using that is really
>> the source of this complication. Let me start by explaining my project
>> structure.
>>
>> I have a set of reusable C++ libraries, each library can be thought of as a
>> component. The structure is very easy to grasp:
>>
>> my_components/
>>   component1/
>>   component2/
>>   component3/
>>
>> Each component is its own project in CMake. Most components have both H and
>> CPP files, but they aren't required to have CPP files. I notice in CMake
>> that you cannot call add_library() if no CPP files have been added.
>
> This has been dicussed some time ago on the list, I can't recall what the
> position of CMake devs was about adding a "add_headers" or similar
> function, but AFAIK add_library() won't be changed.

There is [at least] a feature request
http://public.kitware.com/Bug/view.php?id=7835

which is not exactly that issue but propose to add a new
ADD_EDITABLE
macro in order to make some files appears in the project even if they
are not "compiled".



-- 
Erk


More information about the CMake mailing list