From 6ce341b6d157a04891f30ca0a0ea7e98a131ac4e Mon Sep 17 00:00:00 2001 From: Eugene Lozko Date: Fri, 4 Sep 2026 03:58:18 +0300 Subject: [PATCH 1/2] modules: rename miniocpp -> minio module --- .github/workflows/ci-meson.yml | 6 +++--- CMakeLists.txt | 4 ++-- meson.build | 2 +- modules/{miniocpp.cc => minio.cc} | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) rename modules/{miniocpp.cc => minio.cc} (96%) diff --git a/.github/workflows/ci-meson.yml b/.github/workflows/ci-meson.yml index da7fd3fa..1fdc202b 100644 --- a/.github/workflows/ci-meson.yml +++ b/.github/workflows/ci-meson.yml @@ -64,9 +64,9 @@ jobs: echo "CC=gcc-14" >> "$GITHUB_ENV" echo "CXX=g++-14" >> "$GITHUB_ENV" - # clang-tools-18 надає clang-scan-deps - Meson шукає бінарник тієї ж - # версії, що й сам компілятор, щоб просканувати modules/miniocpp.cc на - # залежності для Ninja dyndep. + # clang-tools-18 provides clang-scan-deps - Meson looks for the binary + # matching the same version as the compiler itself, to scan + # modules/minio.cc for dependencies for Ninja dyndep. - name: Install Clang 18 if Ubuntu Clang if: matrix.config.name == 'Ubuntu_Latest_Clang_Meson' run: | diff --git a/CMakeLists.txt b/CMakeLists.txt index 9f588c86..1d253978 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -184,7 +184,7 @@ target_include_directories(miniocpp PUBLIC ) target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS}) -# Optional C++20 module interface for the public API (modules/miniocpp.cc). +# Optional C++20 module interface for the public API (modules/minio.cc). # FILE_SET CXX_MODULES (CMake 3.28+) attaches it as a real part of the miniocpp # target's build - the compiler gets whatever flags it needs for a module # interface unit (e.g. /interface for MSVC) based on this declaration, not on @@ -250,7 +250,7 @@ if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.28" AND MINIO_CPP_STD STREQUAL "20") PUBLIC FILE_SET CXX_MODULES BASE_DIRS modules - FILES modules/miniocpp.cc + FILES modules/minio.cc ) endif() endif() diff --git a/meson.build b/meson.build index 5efb2d0a..493937bd 100644 --- a/meson.build +++ b/meson.build @@ -61,7 +61,7 @@ if build_module else module_cpp_args = [] endif - miniocpp_module_lib = static_library('miniocpp_module', 'modules/miniocpp.cc', + miniocpp_module_lib = static_library('miniocpp_module', 'modules/minio.cc', include_directories : miniocpp_include, dependencies : all_deps, cpp_args : module_cpp_args, diff --git a/modules/miniocpp.cc b/modules/minio.cc similarity index 96% rename from modules/miniocpp.cc rename to modules/minio.cc index 95fbc250..de72c442 100644 --- a/modules/miniocpp.cc +++ b/modules/minio.cc @@ -2,7 +2,7 @@ module; #include -export module miniocpp; +export module minio; // Re-exporting the public API through the module requires an EXPLICIT using- // declaration per symbol (using ns::Symbol;) - not a using-directive (using From 44d2b6368cb21c9ab01ce98f795ec11f9aaa6321 Mon Sep 17 00:00:00 2001 From: Eugene Lozko Date: Fri, 4 Sep 2026 21:39:02 +0300 Subject: [PATCH 2/2] modules: fix comments --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1d253978..3ebc4218 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -189,7 +189,7 @@ target_link_libraries(miniocpp PUBLIC ${MINIO_CPP_LIBS}) # target's build - the compiler gets whatever flags it needs for a module # interface unit (e.g. /interface for MSVC) based on this declaration, not on # the file's extension, so any CMake/MSBuild/Meson (via cmake.subproject()) -# consumer of this target picks up `import miniocpp;` automatically. Requires +# consumer of this target picks up `import minio;` automatically. Requires # C++20 (MINIO_CPP_STD=20); silently skipped otherwise for older setups. # # CMake's module dependency scanning is only implemented for the Ninja, @@ -424,7 +424,7 @@ endif() # installed package (via find_package(miniocpp) + CMake, as opposed to # consuming subprojects/miniocpp source directly, or via pkg-config/vcpkg) # is missing the generated module metadata CMake needs to let a downstream -# CMake consumer `import miniocpp;` - see +# CMake consumer `import minio;` - see # https://cmake.org/cmake/help/latest/command/install.html#exporting-c-modules. # Separately, installing module interfaces is not supported at all with # the Visual Studio generator (independent of the MINIO_CPP_HAS_CXX_MODULE