cmake4(3)

πŸ“¦ version 0.04, in fedora 44

πŸ¦‹ cmake4 β€” the manual page, but make it cute

okay bestie, gather round, because this is cmake4(3) from the User Contributed Perl Documentation and it's literally about getting you a cmake πŸ’…


✨ NAME ✨

Alien::cmake4 β€” find it, download it, or build it: this is cmake 4 πŸŽ€


🌸 SYNOPSIS 🌸

Straight from Perl, no cap:

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

unshift @PATH, Alien::cmake4->bin_dir;
system Alien::cmake4->exe, ...;

that's it, that's the whole vibe 🫢


πŸ’– DESCRIPTION πŸ’–

So this Alien distribution gives you an external dependency on the build tool cmake, version 4.x.x specifically. And cmake? It's a super popular alternative to autoconf. iconic behavior, honestly πŸ‘‘


🌈 METHODS 🌈

🧚 bin_dir

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

This hands you the list of directories that need to be added to your PATH so that cmake actually works. like, it can't find itself, bestie, you gotta help it πŸ’«

πŸ“ exe

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

The name of the cmake executable. yes that's all, and yes it matters πŸ”₯


πŸŽ€ HELPERS πŸŽ€

⭐ cmake4

%{cmake4}

The name of the cmake executable. (yes, again. it's a helper thing, iykyk πŸ’…)


πŸ‘‘ SEE ALSO πŸ‘‘

  • Alien::Build::Plugin::Build::CMake β€” Alien::Build plugin for cmake. This will automatically pull in Alien::cmake3 if you need it.
  • Alien::CMake β€” this is an older distribution that provides an alienized cmake. It is different in these ways:
    • Alien::cmake3 is based on alienfile and Alien::Build β€” it integrates better with Aliens that are based on that technology.
    • 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.
    • Alien::cmake3 will install on platforms where there is no system cmake and no binary cmake provided by cmake.org β€” it does this by building cmake from source.
    • Alien::cmake3 is preferred β€” in the opinion of the maintainer of both Alien::cmake3 and Alien::CMake, for these reasons.

πŸ’œ 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 set to true, and if a share install is attempted, Alien::cmake4 will not try a binary share install (even if available), and instead a source share install.

πŸ’€ CAVEATS πŸ’€

If you do not have a system cmake version 4.x.x available, then a share install will be attempted. no drama, just so you know 🫑

Binary share installs are attempted on platforms for which the latest version of cmake are provided. As of this writing, this 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 this binary installs. Typically the same versions supported by the operating system vendor and supported by cmake, so that should not be a problem.

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::cmake4 on an unsupported system, you have some options:

  • Install system version of cmake β€” if you can find an older version of cmake 4.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 are 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. lowkey real talk 😭


🫢 AUTHOR 🫢

Author of Alien::cmake4: Michal Josef Špaček <skim@cpan.org>

Author of Alien::cmake3: Graham Ollis <plicease@cpan.org>

Contributors of Alien::cmake3:

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

give them their flowers πŸ’


This software is copyright (c) 2017-2024 by Graham Ollis. This software is copyright (c) 2026 by Michal Josef Špaček.

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 that's a wrap, bestie πŸ’– this whole thing shipped as perl v5.42.3, dated 2026-07-16, and it lives in the manual as cmake4(3). go forth and build something iconic βœ¨πŸ¦‹ periodt

πŸ“¦ where this page comes from