/* This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. */ module; // Everything glm reaches for from the standard library and the intrinsics headers // is included here, in the global module fragment. Their include guards then turn // glm's own #includes into no-ops, so only glm's declarations land in the purview // below -- otherwise the export block would try to export system functions that // have internal linkage, which is ill-formed. #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include export module eu07.glm; // glm is header-only. Including it inside the module purview attaches its // declarations to this module, which is what lets them be exported. Every other // module imports this one instead of including glm directly: GCC 16 rejects the // merge when the same glm declarations arrive from several different modules // ("conflicting imported declaration" on glm::detail::storage), so glm has to be // compiled into exactly one module. // Clang warns that including inside the purview attaches the declarations to // this module. That is exactly the point here, so silence it for this block. #ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Winclude-angled-in-module-purview" #endif export { #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // gtx/string_cast is deliberately absent: it defines static label constants, // and an export block may not export entities with internal linkage. The two // call sites of glm::to_string include it in their own module fragment. #include } #ifdef __clang__ #pragma clang diagnostic pop #endif export { // 12-byte vec3 that stays packed regardless of GLM_FORCE_DEFAULT_ALIGNED_GENTYPES. // Use in structs that must match an exact binary layout (UBOs, vertex data, // serialized formats). using packed_vec3 = glm::vec<3, float, glm::packed_highp>; }