Project

General

Profile

Bug #977

Fix cpack source archive generation: Root folder

Added by Roland Schulz almost 7 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
-
Target version:
Affected version - extra info:
Affected version:
Difficulty:
uncategorized
Close

Description

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

Revision d1564a21 (diff)
Added by Roland Schulz almost 7 years ago

Add default root folder to cpack archives

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

Fixes #977

Change-Id: Iaf42afd3617873e5c1e5e7cb7c327986efa20fcd

History

#1 Updated by Roland Schulz almost 7 years ago

  • Status changed from New to Closed

Also available in: Atom PDF