git: 95d1b03827bd - main - graphics/gdal: Document CMAKE_CXX_SCAN_FOR_MODULES in d8feecdf7fdb6514ad4b714e69b2045d8c297d52
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 19 Feb 2025 11:57:54 UTC
The branch main has been updated by sunpoet: URL: https://cgit.FreeBSD.org/ports/commit/?id=95d1b03827bd565b06e8888b66bcaf79e58f2b13 commit 95d1b03827bd565b06e8888b66bcaf79e58f2b13 Author: Po-Chuan Hsieh <sunpoet@FreeBSD.org> AuthorDate: 2025-02-19 11:53:42 +0000 Commit: Po-Chuan Hsieh <sunpoet@FreeBSD.org> CommitDate: 2025-02-19 11:53:42 +0000 graphics/gdal: Document CMAKE_CXX_SCAN_FOR_MODULES in d8feecdf7fdb6514ad4b714e69b2045d8c297d52 C++ 20 introduced the concept of "modules" to the language. The design requires build systems to order compilations among each other to satisfy import statements reliably. CMake's implementation asks the compiler to scan source files for module dependencies during the build, collates scanning results to infer ordering constraints, and tells the build tool how to dynamically update the build graph. cmake-cxxmodules(7) was added in cmake 3.28. It will scan for c++ modules for c++20 by default. Since poppler uses c++20, it triggers cmake to scan modules by default and it requires clang-scan-deps from llvm. Therefore, we need to turn off CMAKE_CXX_SCAN_FOR_MODULES to fix the build and avoid adding extra dependency on llvm. Reference: https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html --- graphics/gdal/Makefile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/graphics/gdal/Makefile b/graphics/gdal/Makefile index e9e7c3a80c38..0988a7204e1f 100644 --- a/graphics/gdal/Makefile +++ b/graphics/gdal/Makefile @@ -31,6 +31,7 @@ CMAKE_OFF= BUILD_CSHARP_BINDINGS \ BUILD_TESTING \ BUILD_VSIPRELOAD \ CLANG_TIDY_ENABLED \ + CMAKE_CXX_SCAN_FOR_MODULES \ CSHARP_MONO \ ENABLE_DEFLATE64 \ GDAL_ENABLE_HDF5_GLOBAL_LOCK \ @@ -54,8 +55,7 @@ CMAKE_OFF= BUILD_CSHARP_BINDINGS \ GDAL_USE_TIFF_INTERNAL \ GDAL_USE_ZLIB_INTERNAL \ HDFS_ENABLED \ - SWIG_REGENERATE_PYTHON \ - CMAKE_CXX_SCAN_FOR_MODULES + SWIG_REGENERATE_PYTHON CMAKE_ON= BUILD_APPS \ BUILD_SHARED_LIBS \ BUILD_STATIC_LIBS \