Alien::cmake3(3)

πŸ“¦
version 0.10 Β· 2 versions
, in fedora 43

πŸ‘‘ Alien::cmake3 β€” the whole vibe πŸ’…

okay so bestie, listen. This is Alien::cmake3, and it comes to you straight out of the User Contributed Perl Documentation section of the man pages. It's version 0.10, it's giving "external dependency wrangler", and honestly? It ate. πŸ“


✨ NAME ✨

Alien::cmake3 β€” find, or download, or straight-up build cmake 3. That's the whole job. No cap. πŸŽ€


🌸 VERSION 🌸

version 0.10 β€” she's small but she's mighty, periodt.


πŸ¦‹ SYNOPSIS πŸ¦‹

From Perl:

use Alien::cmake3;
use Env qw( @PATH );

unshift @PATH, Alien::cmake3->bin_dir;
system 'cmake', ...;

From alienfile:

use alienfile;

share {
  # Build::CMake plugin pulls in Alien::cmake3 automatically
  plugin 'Build::CMake';
  build [
    # this is the default build step, if you do not specify one.
    [ '%{cmake3}', -G => '%{cmake_generator}', '-DCMAKE_POSITION_INDEPENDENT_CODE:BOOL=true', '-DCMAKE_INSTALL_PREFIX:PATH=%{.install.prefix}', '.' ],
    '%{make}',
    '%{make} install',
  ];
};

Like. Look at that. She just works. ✨


πŸ’– DESCRIPTION πŸ’–

So this Alien distribution hands you an external dependency on the build tool cmake, specifically version 3.x.x. And cmake? cmake is the popular alternative to autoconf. It's the cool cousin. The one who shows up to the function already knowing everyone. 🫢


🌈 METHODS 🌈

bin_dir πŸ’…

my @dirs = Alien::cmake3->bin_dir;

This is the list of directories you gotta add to your PATH so that cmake can actually do its thing. That's it, that's the whole method. Add them to PATH, and cmake becomes a main character on your system. 🌟

exe πŸ‘‘

my $exe = Alien::cmake3->exe;

The name of the cmake executable. Just the name, bestie. She's not complicated. πŸ’œ


🧚 HELPERS 🧚

cmake3

%{cmake3}

The name of the cmake executable β€” but make it alienfile-flavored. iykyk. πŸ“


πŸ”₯ SEE ALSO πŸ”₯

  • Alien::Build::Plugin::Build::CMake β€” an Alien::Build plugin for cmake. This one will automatically pull in Alien::cmake3 if you need it. So thoughtful of her. 🫢
  • Alien::CMake β€” the older distribution that provides an alienized cmake. She's different in these ways, and I'm listing them all because facts are facts:
    • Alien::cmake3 is based on alienfile and Alien::Build. It integrates better with Aliens that are based on that technology. Slay.
    • Alien::cmake3 will provide version 3.x.x. Alien::CMake will provide 2.x.x on some platforms where more recent binaries are not available. Not her fault, it's a platform thing. 😭
    • Alien::cmake3 will install on platforms where there is no system cmake and no binary cmake provided by cmake.org. She does this by building cmake from source. Resilient queen behavior. πŸ‘‘
    • Alien::cmake3 is preferred. In the opinion of the maintainer of both Alien::cmake3 and Alien::CMake, for these reasons. And when the maintainer of both says it, that's not bias, that's authority. πŸ’…

πŸ’€ ENVIRONMENT πŸ’€

  • ALIEN_INSTALL_TYPE β€” this is the normal Alien::Build environment variable, and you can set it to one of share, system or default.
  • ALIEN_CMAKE_FROM_SOURCE β€” if you set this to true, and a share install is attempted, Alien::cmake3 will not try a binary share install (even if one is available), and will instead do a source share install. Forcing her hand, fr fr.

πŸ™ˆ CAVEATS πŸ™ˆ

Okay bestie, this part matters, so put your phone down for a sec. πŸ“±

If you do not have a system cmake version 3.x.x available, then a share install will be attempted.

Binary share installs are attempted on platforms for which the latest version of cmake is provided. As of this writing, that includes: Windows (32/64 bit), macOS (intel/arm universal) and Linux (intel/arm 64 bit). No checks are made to ensure that your platform is supported by these binary installs. Typically it's the same versions supported by the operating system vendor and supported by cmake, so that should not be a problem. But if you are using an operating system not supported by its vendor β€” Please Stop That, this is almost certainly a security vulnerability. 🚨

That said, if you really do need Alien::cmake3 on an unsupported system, you have some options:

  • Install a system version of cmake β€” if you can find an older version of cmake 3.x.x that is supported by your operating system.
  • Force a source code install β€” set the ALIEN_CMAKE_FROM_SOURCE environment variable to a true value to build a share install from source.

Source share installs are attempted on platforms for which the latest version of cmake is not available, like the various flavours of *BSD. This may not be ideal, and if you can install a system version of cmake it may work better.


πŸŽ€ AUTHOR πŸŽ€

Author: Graham Ollis <plicease@cpan.org>

Contributors:

  • Adriano Ferreira (FERREIRA)
  • Dagfinn Ilmari MannsΓ₯ker (ilmari)

Shoutout to the contributors, they understood the assignment. 🫢


This software is copyright (c) 2017-2024 by Graham Ollis.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.


okay and finally, the receipts bestie: this whole page was generated by perl v5.42.0 on 2025-08-27, for Alien::cmake3(3). that's a wrap, go build something iconic. πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from