Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
d66d431
support cmake tests
fdr400 Apr 13, 2026
30d2374
add .gitignore
fdr400 Apr 13, 2026
a8cce34
add cmake tests in CI
fdr400 Apr 18, 2026
8432de0
up
fdr400 Apr 18, 2026
97c6ba1
fix cwd
fdr400 Apr 18, 2026
57ea85f
use std::filesystem in cmake subdir tests
fdr400 Apr 18, 2026
9f20d70
try fix build
fdr400 Apr 18, 2026
8de9466
try fix build
fdr400 Apr 18, 2026
8b5b852
work
fdr400 Apr 18, 2026
3d97b8b
fix debug tests
fdr400 Apr 18, 2026
2eeb284
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 Apr 18, 2026
3bb9029
add shared libraries to dependencies
fdr400 Apr 18, 2026
a84360c
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 Apr 18, 2026
1c69709
add boost.dll module support
fdr400 Apr 19, 2026
af1c6ac
depend each test from its args
fdr400 Apr 19, 2026
a0a9287
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 Apr 19, 2026
dfc4653
fix build with std::filesystem
fdr400 Apr 19, 2026
aa2e196
remove redundant add_dependencies, fix no args add_dependencies
fdr400 Apr 19, 2026
c12ed5d
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 Apr 19, 2026
c74cb78
add modules tests to CI
fdr400 Apr 19, 2026
eff8c4b
fix boost_shared_ptr test
fdr400 Apr 19, 2026
9ea777f
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 Apr 19, 2026
a6329e2
add copyright
fdr400 Apr 19, 2026
e99a587
add module usage sample
fdr400 Apr 19, 2026
9c4c525
fix typos
fdr400 Apr 19, 2026
80c4521
rollback strange rename
fdr400 Apr 19, 2026
cda1667
better
fdr400 Apr 19, 2026
1d91f31
better
fdr400 Apr 19, 2026
c33e508
better
fdr400 Apr 19, 2026
19b49e9
fix modules CI
fdr400 Apr 19, 2026
c004678
use headers file set
fdr400 Apr 19, 2026
320b3e6
add missing include
fdr400 Apr 19, 2026
f14cee4
remove strange includes
fdr400 Apr 19, 2026
943a95a
use report error from module in this_line_location
fdr400 Apr 19, 2026
966f698
import std support
fdr400 Apr 19, 2026
6efabaf
add modules import std tests to CI
fdr400 Apr 19, 2026
2fd3261
Merge branch 'develop' of github.com:fdr400/dll into feature/cmake-tests
fdr400 May 16, 2026
b1082eb
Merge branch 'feature/cmake-tests' into feature/cxx20-modules
fdr400 May 16, 2026
4667ac2
Merge branch 'feature/cxx20-modules' into feature/cxx20-modules-impor…
fdr400 May 16, 2026
fac3180
fix build
fdr400 May 16, 2026
3a23bd4
Merge branch 'feature/cxx20-modules' into feature/cxx20-modules-impor…
fdr400 May 16, 2026
486c803
try fix cmake build
fdr400 May 16, 2026
c7743a0
try fix cmake build
fdr400 May 16, 2026
c974f7a
Merge branch 'feature/cxx20-modules' into feature/cxx20-modules-impor…
fdr400 May 16, 2026
85f5a9e
Merge branch 'develop' of github.com:fdr400/dll into feature/cxx20-mo…
fdr400 May 24, 2026
b41a5f0
fix conflicts
fdr400 May 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,25 @@ jobs:
./b2 -d0 headers
./b2 -j4 variant=debug tools/inspect

- name: Run modules tests
if: ${{matrix.toolset == 'clang-19'}}
run: |
cd ../boost-root/libs/$LIBRARY
cmake -S test/cmake_subdir_test -B __build \
-GNinja \
-DBUILD_TESTING=1 \
-DBOOST_DLL_USE_STD_FS=1 \
-DBOOST_USE_MODULES=1 \
-DCMAKE_CXX_COMPILER=${{matrix.compiler}} \
-DCMAKE_CXX_FLAGS="-stdlib=libc++" \
-DCMAKE_CXX_STANDARD=23 \
-DCMAKE_CXX_MODULE_STD=ON \
-DCMAKE_EXPERIMENTAL_CXX_IMPORT_STD=0e5b6991-d74f-4b3d-a41c-cf096e0b2508

cmake --build __build
ctest --test-dir __build --output-on-failure --no-tests=error -VV
rm -rf __build

- name: Run modules tests without 'import std;'
if: ${{matrix.toolset == 'clang-19'}}
run: |
Expand Down
13 changes: 12 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,18 @@ target_link_libraries(boost_dll_boost_fs
if (BOOST_USE_MODULES)
add_library(boost_dll)
target_compile_definitions(boost_dll PUBLIC BOOST_USE_MODULES)
target_compile_features(boost_dll PUBLIC cxx_std_20)

get_property(__standard TARGET boost_dll PROPERTY CXX_STANDARD)
if (__standard IN_LIST CMAKE_CXX_COMPILER_IMPORT_STD AND CMAKE_CXX_MODULE_STD)
target_compile_features(boost_dll PUBLIC cxx_std_23)
target_compile_definitions(boost_dll PRIVATE BOOST_DLL_USE_STD_MODULE)
message(STATUS "Using `import std;`")
else()
target_compile_features(boost_dll PUBLIC cxx_std_20)
message(STATUS "`import std;` is not available")
endif()
unset(__standard)

target_sources(boost_dll
PUBLIC
FILE_SET CXX_MODULES
Expand Down
4 changes: 4 additions & 0 deletions include/boost/dll/config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ using system_error = std::conditional_t<BOOST_DLL_USE_STD_FS, std::system_error,
#ifdef BOOST_DLL_USE_STD_FS

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <filesystem>
#include <system_error>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace fs {
Expand Down Expand Up @@ -94,7 +96,9 @@ namespace boost { namespace dll { namespace detail {
#else // BOOST_DLL_USE_STD_FS

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <memory>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/aggressive_ptr_cast.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,11 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <cstring> // std::memcpy
#include <memory>
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#if defined(__GNUC__) && defined(__GNUC_MINOR__) && (__GNUC__ * 100 + __GNUC_MINOR__ > 301)
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/demangling/demangle_symbol.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
#include <boost/dll/config.hpp>

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <string>
#include <algorithm>
#include <memory>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#if defined(_MSC_VER) // MSVC, Clang-cl, and ICC on Windows
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/demangling/itanium.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
#define BOOST_DLL_DETAIL_DEMANGLING_ITANIUM_HPP_

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <algorithm>
#include <iterator>
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/detail/demangling/mangled_storage_base.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/demangling/mangled_storage_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,12 @@
#if !defined(BOOST_DLL_INTERFACE_UNIT)
#include <boost/type_index/ctti_type_index.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <vector>
#include <string>
#include <map>
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/detail/demangling/demangle_symbol.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/demangling/msvc.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,11 @@
#if !defined(BOOST_DLL_INTERFACE_UNIT)
#include <boost/core/detail/string_view.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <iterator>
#include <algorithm>
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/detail/demangling/mangled_storage_base.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/elf_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@
#if !defined(BOOST_DLL_INTERFACE_UNIT)
#include <boost/throw_exception.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <cstdint>
#include <cstring>
#include <fstream>
#include <vector>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/import_mangled_helpers.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace experimental { namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/macho_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <algorithm>
#include <cstdint>
#include <fstream>
#include <string> // for std::getline
#include <vector>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/pe_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <cstdint>
#include <cstring>
#include <fstream>
#include <string> // for std::getline
#include <vector>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/posix/path_from_handle.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
#if !defined(BOOST_DLL_INTERFACE_UNIT)
# include <mach-o/dyld.h>
# include <mach-o/nlist.h>
#if !defined(BOOST_DLL_USE_STD_MODULE)
# include <cstddef> // for std::ptrdiff_t
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
10 changes: 9 additions & 1 deletion include/boost/dll/detail/posix/program_location_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#if BOOST_OS_MACOS || BOOST_OS_IOS

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <string>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#include <mach-o/dyld.h>
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

Expand Down Expand Up @@ -51,7 +53,9 @@ namespace boost { namespace dll { namespace detail {
#elif BOOST_OS_SOLARIS

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <stdlib.h>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand All @@ -65,10 +69,12 @@ namespace boost { namespace dll { namespace detail {
#elif BOOST_OS_BSD_FREE

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <string>
#include <stdlib.h>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#include <sys/types.h>
#include <sys/sysctl.h>
#include <stdlib.h>
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down Expand Up @@ -133,8 +139,10 @@ namespace boost { namespace dll { namespace detail {
#elif BOOST_OS_QNX

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <fstream>
#include <string> // for std::getline
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
4 changes: 3 additions & 1 deletion include/boost/dll/detail/posix/shared_library_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,12 @@
#include <boost/core/invoke_swap.hpp>
#include <boost/predef/os.h>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <utility> // std::move
#include <cstring> // strncmp
#endif // !defined(BOOST_DLL_USE_STD_MODULE)

#include <dlfcn.h>
#include <cstring> // strncmp
#if !BOOST_OS_MACOS && !BOOST_OS_IOS && !BOOST_OS_QNX && !BOOST_OS_CYGWIN
# include <link.h>
#elif BOOST_OS_QNX
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/system_error.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
# include <dlfcn.h>
#endif

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <system_error>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)

#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/detail/type_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@
# include <boost/winapi/basic_types.hpp>
# endif

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <typeinfo>
#include <cstring>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

namespace boost { namespace dll { namespace detail {
Expand Down
9 changes: 6 additions & 3 deletions include/boost/dll/detail/windows/shared_library_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,19 @@

#include <boost/dll/config.hpp>

#ifdef BOOST_HAS_PRAGMA_ONCE
# pragma once
#endif
#include <boost/dll/shared_library_load_mode.hpp>
#include <boost/dll/detail/aggressive_ptr_cast.hpp>
#include <boost/dll/detail/system_error.hpp>
#include <boost/dll/detail/windows/path_from_handle.hpp>

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#include <boost/core/invoke_swap.hpp>

#include <boost/winapi/dll.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <utility> // std::move
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/shared_library_load_mode.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/import.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <memory> // std::addressof
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/config.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/import_class.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,10 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <memory>
#include <utility> // std::move
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/smart_library.hpp>
Expand Down
3 changes: 2 additions & 1 deletion include/boost/dll/import_mangled.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,12 @@
#endif

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <memory> // std::addressof
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/config.hpp>
#include <boost/dll/smart_library.hpp>
#include <boost/dll/detail/import_mangled_helpers.hpp>

Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/library_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@
#include <boost/predef/architecture.h>
#include <boost/throw_exception.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <fstream>
#include <type_traits>
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/detail/pe_info.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/runtime_symbol_info.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
#include <boost/predef/os.h>
#include <boost/predef/compiler/visualc.h>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <memory> // std::addressof
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#if BOOST_OS_WINDOWS
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/shared_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,10 @@
#include <boost/core/enable_if.hpp>
#include <boost/core/explicit_operator_bool.hpp>

#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <type_traits>
#include <utility> // std::move
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#include <boost/dll/detail/system_error.hpp>
Expand Down
2 changes: 2 additions & 0 deletions include/boost/dll/smart_library.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,10 @@
#include <boost/dll/config.hpp>

#if !defined(BOOST_DLL_INTERFACE_UNIT)
#if !defined(BOOST_DLL_USE_STD_MODULE)
#include <type_traits>
#include <utility> // std::move
#endif // !defined(BOOST_DLL_USE_STD_MODULE)
#endif // !defined(BOOST_DLL_INTERFACE_UNIT)

#if (__cplusplus < 201103L) && (!defined(_MSVC_LANG) || _MSVC_LANG < 201103L)
Expand Down
Loading
Loading