py-pikepdf: fix CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND

Closes: https://trac.macports.org/ticket/74122
See: https://www.kitware.com/import-cmake-the-experiment-is-over/
This commit is contained in:
Marius Schamschula
2026-06-22 15:16:31 -05:00
parent 80d2f4600a
commit 9a1cc7c11d
2 changed files with 8 additions and 15 deletions
+1 -2
View File
@@ -44,7 +44,6 @@ if {${name} ne ${subport}} {
compiler.blacklist-append {clang < 900}
# workaround for CMAKE_CXX_COMPILER_CLANG_SCAN_DEPS-NOTFOUND
# See: https://gitlab.kitware.com/cmake/cmake/-/work_items/25956
# See: https://www.scivision.dev/cmake-clang-scandep-workaround/
# See: https://www.kitware.com/import-cmake-the-experiment-is-over/
patchfiles patch-CMakeLists.txt.diff
}
@@ -1,20 +1,14 @@
--- CMakeLists.txt.orig 2022-11-09 06:37:21
+++ CMakeLists.txt 2026-05-25 09:01:24
@@ -2,8 +2,17 @@
+++ CMakeLists.txt 2026-06-22 15:10:29
@@ -1,8 +1,10 @@
# SPDX-FileCopyrightText: 2022 James R. Barlow
# SPDX-License-Identifier: MPL-2.0
cmake_minimum_required(VERSION 3.15...3.30)
+
-cmake_minimum_required(VERSION 3.15...3.30)
+cmake_minimum_required(VERSION 3.28)
project(pikepdf LANGUAGES CXX)
+if(${PROJECT_NAME}_cxx) # arbitrary user option
+ set(CMAKE_CXX_SCAN_FOR_MODULES OFF) # workaround CMake 3.28.0 .. 3.29.2 with Clang
+ enable_language(CXX)
+ set(CMAKE_CXX_SCAN_FOR_MODULES ON) # optional, if project actually uses C++ modules
+endif()
+
+set(CMAKE_CXX_STANDARD 20)
+
+set(CMAKE_CXX_SCAN_FOR_MODULES OFF)
find_package(Python 3.10
REQUIRED COMPONENTS Interpreter Development.Module
OPTIONAL_COMPONENTS Development.SABIModule)