# After copy\_directory, the content in dSYM is changed

**URL:** https://discourse.cmake.org/t/after-copy-directory-the-content-in-dsym-is-changed/3812
**Category:** Usage
**Created:** [July 22, 2021, 5:04am UTC](https://discourse.cmake.org/t/after-copy-directory-the-content-in-dsym-is-changed/3812 "2021-07-22T05:04:47Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![naeco2008](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/n/5daacb/32.png) [@naeco2008](https://discourse.cmake.org/u/naeco2008)
#### Post date: [July 22, 2021, 5:04am UTC](https://discourse.cmake.org/t/after-copy-directory-the-content-in-dsym-is-changed/3812/1 "2021-07-22T05:04:47Z")

</div>

I am using cmake3.20.1. My CMakeList.txt looks like below:

add\_custom\_command(TARGET ${target} POST\_BUILD  
COMMAND ${CMAKE\_COMMAND} -E copy\_directory “$\<TARGET\_FILE:${target}\>.dSYM”  
“${j\_default\_sym\_path}/$\<TARGET\_FILE\_NAME:${target}\>.dSYM”)

After the copy, the copied dSYM size is changed. Sometimes the size is 0, sometimes the size is much smaller than the orginal one. If you dig into the copied dSYM file, you can see that the dylib in the dSYM is 0.

Did anyone ever meet such issues before? Do you have some suggestions or workaround?

Thanks,
