[CMake] Re: 'make dist' like target

Alan W. Irwin irwin at beluga.phys.uvic.ca
Sun Jul 15 13:38:14 EDT 2007


On 2007-07-15 19:05+0200 Hendrik Sattler wrote:

> Am Sonntag 15 Juli 2007 18:53 schrieb Alan W. Irwin:
>> Ideally, what I would like is CPACK_SOURCE_SELECT_FILES (or whatever you
>> want to call it) takes precedence over CPACK_SOURCE_IGNORE_FILES, but if a
>> part of the source tree is mentioned by neither it gets packed into the
>> source distribution by default.  With that scheme I could set, e.g.,
>>
>> set(CPACK_SOURCE_SELECT_FILES "x\\\\.pdf$")
>> set(CPACK_SOURCE_IGNORE_FILES "\\\\.pdf$")
>>
>> to conveniently select x.pdf and the remaining non-pdf part of the source
>> tree to be included in the source distribution while excluding all other
>> pdfs from that distribution. Without the CPACK_SOURCE_SELECT_FILES facility
>> I have to name _every_ separate pdf file I want to exclude from the source
>> tree.
>
> Doesn't this field contain a regular expression list?

Yes.

> This would be the way to
> go.

I understand RE's are extremely powerful, but I don't have enough experience
with them to implement what you suggest without some help. How could I do
the above (exclude all files ending with .pdf except for files ending with
x.pdf) using CPACK_SOURCE_IGNORE_FILES alone?  Essentially I need
to ignore "\\\\.pdf$" AND NOT "x\\\\.pdf$", but I don't know how to specify
AND NOT in regular expressions.

Same question for the case of certain source tree directories where I need
to exclude every file in the directory except for a specific few.  To make
the question really specific for the RE experts here suppose I have a
specific directory in the source tree called papers/paper1 filled with files
I want to exclude except for papers/paper1/paper1_part1.tex and
papers/paper1/paper1_part2.tex?

So this would be "^${PROJECT_SOURCE_DIR}.*/papers/paper1" AND NOT
"^${PROJECT_SOURCE_DIR}.*/papers/paper1/paper1_part[12].tex"

but (again) how do you specify the AND NOT in RE's?

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list