View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0016076CMakeCMakeSetuppublic2016-04-22 10:392016-06-10 14:21
Reporterblackstar 
Assigned ToBrad King 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformLinuxOSCentOSOS Version6.5
Product VersionCMake 3.5.2 
Target VersionCMake 3.7Fixed in VersionCMake 3.7 
Summary0016076: bin install directory configuration
DescriptionIt is impossible to set the CMake bin install directory with bootstrap options.
The bin install directory is always <PREFIX>/bin.
If cmake binary is moved to other location, The CMAKE_ROOT could not be find, because the unique search directory of /Modules/CMake.cmake file is at the same level of bin directory.

CMake Error: Could not find CMAKE_ROOT !!!
CMake has most likely not been installed correctly.
Modules directory not found in

So it is impossible to have in the same install directory, several CMake binary of different OS.
For example :
   cmake-3.5.2/bin/centos6.2/cmake
   cmake-3.5.2/bin/ubuntu14.04/cmake

Is it possible to add an option in bootstrap, like --docdir, to set the binary install directory relative to <PREFIX> ?
Steps To Reproducedo a cmake installation
move the cmake binary
run cmake
TagsNo tags attached.
Attached Files

 Relationships

  Notes
(0040924)
Brad King (manager)
2016-04-22 10:54

The install destination is hard-coded here:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/CMakeLists.txt;hb=v3.5.2#l792 [^]

as:

 install(TARGETS ${_tool} DESTINATION bin ${COMPONENT})

If an option were added to change it then cmSystemTools::FindCMakeResources would also need to be updated:

 https://cmake.org/gitweb?p=cmake.git;a=blob;f=Source/cmSystemTools.cxx;hb=v3.5.2#l2214 [^]

and probably a few other places.

We've never needed to do this because we just install all of CMake to a dedicated prefix and then symlink to it from whatever location we want in our PATH. The use case of sharing resources with multiple binaries has not been raised before.
(0041120)
Brad King (manager)
2016-06-01 14:12

There is a patch discussed on the mailing list here:

 [PATCH] ... Add a --bindir option to bootstrap and use it to install cmake in custom directory
 http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/16480 [^]
(0041124)
Brad King (manager)
2016-06-02 09:42

The patch from the thread linked in 0016076:0041120 has been applied:

Add option to control 'bin' directory of CMake's own installation
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18bfbc97 [^]
(0041160)
Kitware Robot (administrator)
2016-06-10 14:21

This issue tracker is no longer used. Further discussion of this issue may take place in the current CMake Issues page linked in the banner at the top of this page.

 Issue History
Date Modified Username Field Change
2016-04-22 10:39 blackstar New Issue
2016-04-22 10:54 Brad King Note Added: 0040924
2016-06-01 14:12 Brad King Note Added: 0041120
2016-06-02 09:42 Brad King Note Added: 0041124
2016-06-02 09:43 Brad King Assigned To => Brad King
2016-06-02 09:43 Brad King Status new => resolved
2016-06-02 09:43 Brad King Resolution open => fixed
2016-06-02 09:43 Brad King Fixed in Version => CMake 3.7
2016-06-02 09:43 Brad King Target Version => CMake 3.7
2016-06-10 14:21 Kitware Robot Note Added: 0041160
2016-06-10 14:21 Kitware Robot Status resolved => closed


Copyright © 2000 - 2018 MantisBT Team