Jason E. Hale c7532c2761 devel/cmake-core: Respect user CFLAGS/CXXFLAGS
CMake has set a few compiler optimization flags for ages, depending upon
the build type. For Debug and Release build types, especially, these
flags are overridden in Mk/Uses/cmake.mk for projects that use CMake,
including other CMake components, i.e., devel/cmake-(doc|gui|man), but
not cmake-core, since it has to bootstrap itself.

This change makes the core component build with the same flags as the
rest of the cmake ports. For most users, this just means that cmake-core
will now build with -O2 instead of -O3 by default.

Not bumping PORTREVISION since nobody has really cared about this for the
past 15 years. To be clear, all other CFLAGS/CXXFLAGS have been
respected. This just elimitates the -O3 flag that CMake internally adds
for Release builds of cmake-core.

Based upon work by former FreeBSD committer koobs. [1]

[1] da342cfb3d [1]

Co-authored-by: Daniel Engberg <diizzy@FreeBSD.org>

PR:		286494
2025-05-03 03:07:57 -04:00
..