File tree Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Expand file tree Collapse file tree 2 files changed +11
-12
lines changed Original file line number Diff line number Diff line change @@ -112,17 +112,18 @@ bs_check_posix_mmap(_ZK_HAS_MMAP_POSIX)
112112bs_check_win32_mmap(_ZK_HAS_MMAP_WIN32)
113113
114114if (ZK_ENABLE_MMAP AND (_ZK_HAS_MMAP_POSIX OR _ZK_HAS_MMAP_WIN32))
115- if (_ZK_HAS_MMAP_POSIX)
116- message (STATUS "ZenKit: Building with POSIX memory mapping support" )
117- list (APPEND _ZK_SOURCES src/MmapPosix.cc)
118- target_compile_definitions (zenkit PUBLIC _ZK_WITH_MMAP=1)
119- elseif (_ZK_HAS_MMAP_WIN32)
120- message (STATUS "ZenKit: Building with Windows memory mapping support" )
121- list (APPEND _ZK_SOURCES src/MmapWin32.cc)
122- target_compile_definitions (zenkit PUBLIC _ZK_WITH_MMAP=1)
123- endif ()
115+ message (WARNING "ZenKit: Memory mapping enabled" )
116+ target_compile_definitions (zenkit PUBLIC _ZK_WITH_MMAP=1)
124117else ()
125- message (WARNING "ZenKit: Building WITHOUT memory mapping support" )
118+ message (WARNING "ZenKit: Memory mapping DISABLED" )
119+ endif ()
120+
121+ if (_ZK_HAS_MMAP_POSIX)
122+ message (STATUS "ZenKit: Building with POSIX memory mapping support" )
123+ list (APPEND _ZK_SOURCES src/MmapPosix.cc)
124+ elseif (_ZK_HAS_MMAP_WIN32)
125+ message (STATUS "ZenKit: Building with Windows memory mapping support" )
126+ list (APPEND _ZK_SOURCES src/MmapWin32.cc)
126127endif ()
127128
128129target_sources (zenkit PRIVATE ${_ZK_SOURCES} ${_ZK_HEADERS} )
Original file line number Diff line number Diff line change 44#include < filesystem>
55
66namespace zenkit {
7- #ifdef _ZK_WITH_MMAP
87 class Mmap {
98 public:
109 explicit Mmap (std::filesystem::path const & path);
@@ -28,5 +27,4 @@ namespace zenkit {
2827
2928 void * _m_platform_handle {nullptr };
3029 };
31- #endif
3230} // namespace zenkit
You can’t perform that action at this time.
0 commit comments