Create tar archive with Cmake
问题 I have used the *_OUTPUT_PATH variables in my CMakeLists.txt file to specify specific locations for my binaries and library files, and that seems to be working "automatically" I would like as part of a "build" for one final step to happen, which is to create a tarball of the binaries that output directory. What do I need to add to create a tar? 回答1: You can use a CMake custom target to invoke CMake in command mode and have it produce a tarball from the binaries in the output directory. Here