[cmake-developers] parallel install of different cmake versions

Orion Poplawski orion at cora.nwra.com
Thu Dec 17 22:05:26 EST 2015


On 12/14/2015 07:42 AM, Brad King wrote:
> On 12/11/2015 06:42 PM, Orion Poplawski wrote:
>> For Fedora EPEL we often end up packaging newer versions of cmake as cmakeXY
>> (e.g. cmake34) that can be installed in parallel with the system cmake.  This
>> is a fairly invasive process.  I'm attaching the current patch I'm working on
>> for this.  Is there any interest in cmake itself for supporting this kind of
>> thing?
>
> Not particularly.  That does look pretty invasive.
>
> Why not just install it to /usr/lib/cmake34 with normal names and symlink
> the versioned names?  E.g.
>
>   /usr/bin/cmake34 -> /usr/lib/cmake34/bin/cmake
>   /usr/bin/ctest34 -> /usr/lib/cmake34/bin/ctest
>   ...
>
> I have many different CMake versions installed on my system in different
> directories and use aliases or symlinks to reference them without being
> in my PATH directly.
>
> -Brad
>

I'm not sure this would work.  There seems to be many places in the code 
(some of which the patch addresses) where it calls executes "cmake" or 
"ctest" regardless of the name it was called with.  If 
/usr/lib/cmake34/bin was not in the path (which would be the case with 
our EPEL packages unless we did more configuration) it would then end up 
calling the system cmake/ctest/etc.  This sounds like a recipe for 
disaster.  Or does cmake/ctest modify PATH internally?

-- 
Orion Poplawski
Technical Manager                     303-415-9701 x222
NWRA/CoRA Division                    FAX: 303-415-9702
3380 Mitchell Lane                  orion at cora.nwra.com
Boulder, CO 80301              http://www.cora.nwra.com


More information about the cmake-developers mailing list