From 985a4414d70060d804f4fe647f3e92435a087fc6 Mon Sep 17 00:00:00 2001 From: light7734 Date: Tue, 20 Jan 2026 11:07:20 +0330 Subject: [PATCH] refactor: remove env module --- modules/CMakeLists.txt | 1 - modules/env/constants.cppm | 71 -------------------------------------- 2 files changed, 72 deletions(-) delete mode 100644 modules/env/constants.cppm diff --git a/modules/CMakeLists.txt b/modules/CMakeLists.txt index 171db86..a282d41 100644 --- a/modules/CMakeLists.txt +++ b/modules/CMakeLists.txt @@ -3,7 +3,6 @@ add_module(NAME logger INTERFACES logger.cppm TESTS logger.test.cpp DEPENDENCIES add_module(NAME tracer INTERFACES tracer.cppm DEPENDENCIES preliminary logger) add_module(NAME bitwise INTERFACES operations.cppm DEPENDENCIES preliminary) -add_module(NAME env INTERFACES constants.cppm DEPENDENCIES preliminary) add_module(NAME memory INTERFACES null_on_move.cppm reference.cppm scope.cppm DEPENDENCIES preliminary diff --git a/modules/env/constants.cppm b/modules/env/constants.cppm deleted file mode 100644 index 4ee674a..0000000 --- a/modules/env/constants.cppm +++ /dev/null @@ -1,71 +0,0 @@ -export module env; - -import preliminary; - -export namespace lt { - -enum class Platform : u8 -{ - /** The GNU/Linux platform. - * Tested on the following distros: arch-x86_64 - * @note: Named like so because `linux` is a built-in identifier. - * */ - gnu_linux, - - /** - * The Microsoft Windows(tm) platform. - * Tested on the following architectures: x86_64 - */ - windows, - - /** - * The apple's macOS platform. - * Currently not supported. - */ - mac, -}; - -/** The compiler that was used for compiling the project. */ -enum class Compiler : u8 -{ - clang, - gcc, - msvc, - apple_clang, -}; - -namespace constants { - -#if defined(LIGHT_PLATFORM_WINDOWS) - #define lt_win(x) -constexpr auto platform = Platform::windows; -constexpr auto platform_name = "windows"; - - #undef LIGHT_PLATFORM_WINDOWS - -#elif defined(LIGHT_PLATFORM_LINUX) -constexpr auto platform = Platform::gnu_linux; -constexpr auto platform_name = "gnu_linux"; - -#elif defined(LIGHT_PLATFORM_MAC) - #define lt_mac(x) x -constexpr auto platform = Platform::mac; -constexpr auto platform_name = "mac"; - -#else - #error "Unsupported platform: Unknown" - -#endif - -/** @TODO(Light): Handle other compilers... */ -#ifdef __clang__ -constexpr auto compiler = Compiler::clang; -constexpr auto compiler_name = "clang"; - -/** @TODO(Light): insert the full identifier, including version information and such */ -constexpr auto compiler_identifier = "clang"; -#endif - -} // namespace constants - -} // namespace lt