Correct way to use CPack to distribute binaries

Hi CMB community,

I am new to CPack and I would like to learn it.
I see that CMB superbuild has CPack rules implemented but I didn’t find any documentation of how to properly use it.

Here is what I found out. There is a folder called cpack in the build tree after cmb-superbuild has been built. Go to the subfolder where a CMakeLists.txt is.

mkdir build && cd build
cmake ..
CPack

Is this how CPack is supposed to be used?

Thanks,
Yang

There are tests with a cpack- prefix on their name. You can run them with ctest -R cpack-