head 1.1; access; symbols pkgsrc-2026Q1:1.1.0.4 pkgsrc-2026Q1-base:1.1 pkgsrc-2025Q4:1.1.0.2 pkgsrc-2025Q4-base:1.1; locks; strict; comment @# @; 1.1 date 2025.10.02.11.49.44; author nia; state Exp; branches; next ; commitid joTuSMKhX6GUnZcG; desc @@ 1.1 log @cmake39: Initial import. This version of cmake is intended for: - users who wish to compile software written before CMake 4. - developers who wish to test their software with an old cmake version to ensure maximum compatibility. - platforms which lack a C++11 compiler. - platforms which lack support for libuv (e.g. HP-UX). @ text @$NetBSD$ Add CMAKE_PKGSRC_BUILD_FLAGS to allow pkgsrc-based builds to set compiler optimizer flags (overrides CMAKE_BUILD_TYPE). Also enabled for CMAKE_BOOTSTRAP so it is applied to the build of cmake itself. --- Modules/Compiler/GNU.cmake.orig 2017-11-10 12:28:57.000000000 +0000 +++ Modules/Compiler/GNU.cmake @@@@ -39,9 +39,11 @@@@ macro(__compiler_gnu lang) # Initial configuration flags. string(APPEND CMAKE_${lang}_FLAGS_INIT " ") string(APPEND CMAKE_${lang}_FLAGS_DEBUG_INIT " -g") - string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") - string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + if(NOT CMAKE_BOOTSTRAP AND NOT CMAKE_PKGSRC_BUILD_FLAGS) + string(APPEND CMAKE_${lang}_FLAGS_MINSIZEREL_INIT " -Os -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELEASE_INIT " -O3 -DNDEBUG") + string(APPEND CMAKE_${lang}_FLAGS_RELWITHDEBINFO_INIT " -O2 -g -DNDEBUG") + endif() set(CMAKE_${lang}_CREATE_PREPROCESSED_SOURCE " -E > ") set(CMAKE_${lang}_CREATE_ASSEMBLY_SOURCE " -S -o ") if(NOT APPLE OR NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 4) # work around #4462 @