<div dir="ltr"><div>Hi all,</div><div><br></div>I've run into an annoying issue making package sources with CPack in OS X
(Mavericks and Yosemite).
<br>
<br>I set up CPack to produce a tarball of my source tree with bzip, but in OS X tar will pick up the AppleDouble files in the source
folder and stuff them into the archive too. As a result my tarball is full
of duplicate source files (i.e., source.cc and its double ._source.cc),
which causes problems when building the source later.
<br>
<br>This is <b class=""><span class="">*</span>not<span class="">*</span></b> the fault of CPack; it is a known issue with tar in OS X. The way to suppress the AppleDouble files when running tar
on the command line is to set the environment variable
COPYFILE_DISABLE=1, e.g.,
<br>
<br>$> COPYFILE_DISABLE=1 tar cjf package.tbz2 /path/to/src
<br>
<br>This works just fine for me. Unfortunately, even if I have
COPYFILE_DISABLE set in my environment, CPack doesn't seem to pick
it up when calling tar. As a result the AppleDouble files keep showing
up in my archive when I call "make package_source." While it's not a blocker for me -- I can produce the source package on a Linux box -- I do most of my development on my MacBook so this is pretty annoying.<br>
<br>I tried some other tricks, like including the line
<br>
<br>SET (CPACK_SOURCE_IGNORE_FILES "[.]_.*;")
<br>
<br>in my top-level CMakeLists.txt, but that doesn't help.
<br>
<br>I looked through the cmake email archives but couldn't find anyone
else who has raised this issue... so either I've missed the right emails
or there is an obvious fix I'm overlooking. Any ideas what I'm doing
wrong?
<br>
<br>Thanks for your attention!<br>
<br>Best regards,
<br>Segev BenZvi <br></div>