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.k...@kitware.com] 
Envoyé : vendredi 27 mai 2016 17:52
À : BUNEL Nicolas
Cc : cmake-developers@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

Attachment: 0003-fix-issue-0016076-Find-prefix-directory-from-exe_dir.patch
Description: 0003-fix-issue-0016076-Find-prefix-directory-from-exe_dir.patch

-- 

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/mailman/listinfo/cmake-developers

Reply via email to