[cmake-developers] [PATCH] fix issue #0016076 Add a --bindir option to bootstrap and use it to install cmake in custom directory

BUNEL Nicolas nicolas.bunel at thalesgroup.com
Mon May 30 10:50:17 EDT 2016


Hi,

Here, the new patch that modifies the way to find the prefix directory, without using CMAKE_INSTALL_PREFIX.
This patch follows the 2 previous patches that I submit on 05/27/2016

Thanks
Nicolas


-----Message d'origine-----
De : Brad King [mailto:brad.king at kitware.com] 
Envoyé : vendredi 27 mai 2016 17:52
À : BUNEL Nicolas
Cc : cmake-developers at cmake.org
Objet : Re: [cmake-developers] [PATCH] fix issue #0016076 Add a --bindir option to bootstrap and use it to install cmake in custom directory

On 05/27/2016 10:59 AM, BUNEL Nicolas wrote:
> I add the --bindir option to bootstrap.
> 
> The patches are attach to this email.

Thanks for working on this.  See below for comments.

> Is-it possible to add these modifications in cmake master branch ?

Yes, but as announced on the list earlier today non-cleanup development is frozen until after the 3.6 release branch is created on June 1.  This can be integrated after that.

> +#define CMAKE_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@"
...
> -  // Install tree has "<prefix>/bin/cmake" and "<prefix><CMAKE_DATA_DIR>".
> -  std::string dir = cmSystemTools::GetFilenamePath(exe_dir);
> +  // Install tree has "<prefix>/<CMAKE_BIN_DIR>/cmake" and "<prefix><CMAKE_DATA_DIR>".
> +  std::string dir = CMAKE_INSTALL_PREFIX;
>    cmSystemToolsCMakeRoot = dir + CMAKE_DATA_DIR;

The purpose of cmSystemTools::FindCMakeResources's logic is to find resources relative to the location of the CMake binary so that the installation can be relocated.  We cannot use a configured/hard-coded CMAKE_INSTALL_PREFIX.  Please revise the logic to compute the prefix from `exe_dir` by stripping the suffix corresponding to CMAKE_BIN_DIR.

Thanks,
-Brad

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-fix-issue-0016076-Find-prefix-directory-from-exe_dir.patch
Type: application/octet-stream
Size: 2529 bytes
Desc: 0003-fix-issue-0016076-Find-prefix-directory-from-exe_dir.patch
URL: <http://public.kitware.com/pipermail/cmake-developers/attachments/20160530/282c765c/attachment.obj>


More information about the cmake-developers mailing list