Currently a source archive generated with "cpack --config CPackSourceConfig.cmake -G TGZ" doesn't contain a root folder. It is caused by "set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)" in CMakeLists.txt. The option affects both source archives and binary archives. The root folder name produced by cmake with that option turned on for packages is equal to the archive name (e.g. Gromacs-4.6-dev-Source or Gromacs-4.6-dev-Linux for binary). For binary packages it is possible to create a package with any root folder name with e.g. "cmake -DGMX_USE_RELATIVE_INSTALL_PATH=yes -DGMX_INSTALL_PREFIX=gromacs/". This is currenlty used for the Jenkins nightly binaries. If we would use CPACK_INCLUDE_TOPLEVEL_DIRECTORY=1 also for binaries the root folder would not be "gromacs" but "Gromacs-4.6-dev-Linux". I'm not sure which is better. I'm not aware of a option to specify a root folder for source packages manually (as we do for binaries), rename the root folder used by cmake (http://www.cmake.org/pipermail/cmake/2012-May/050447.html), or set CPACK_INCLUDE_TOPLEVEL_DIRECTORY different for source and binary packages.

Given that I think we should not set CPACK_INCLUDE_TOPLEVEL_DIRECTORY. This still allows the creator of a binary archive to use "cmake -DGMX_USE_RELATIVE_INSTALL_PATH=yes -DGMX_INSTALL_PREFIX=gromacs/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=0" if he chooses to have just "gromacs" as the root folder instead of "Gromacs-4.6-dev-Linux".

Associated revisions

Fixes that source archives had no root folder. If non-defaultroot folder for binary archives is wanted, this still can beachived by:cmake -DGMX_INSTALL_PREFIX={path}/ -DCPACK_INCLUDE_TOPLEVEL_DIRECTORY=0