From 011b24123b2229c610c37a8c0456966660304a09 Mon Sep 17 00:00:00 2001 From: Victor Zverovich Date: Tue, 3 Mar 2026 12:11:52 -0800 Subject: [PATCH] Cleanup module test --- CMakeLists.txt | 2 +- test/CMakeLists.txt | 26 ++++---------------------- 2 files changed, 5 insertions(+), 23 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f4cfced1..f61ab31b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,7 +88,7 @@ set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE STRING set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.") -# Get version from base.h +# Get version from base.h. file(READ include/fmt/base.h base_h) if (NOT base_h MATCHES "FMT_VERSION ([0-9]+)([0-9][0-9])([0-9][0-9])") message(FATAL_ERROR "Cannot get FMT_VERSION from base.h.") diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 9aabc639..5e95851b 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -82,27 +82,9 @@ add_executable(perf-sanity perf-sanity.cc) target_link_libraries(perf-sanity fmt::fmt) if (FMT_MODULE) - # The module-test.cc needs some work and is not working yet. - # For now We simply just return - # so that the other tests are not affected. - return() - # The tests need {fmt} to be compiled as traditional library - # because of visibility of implementation details. - # If module support is present the module tests require a - # test-only module to be built from {fmt} - #add_library(test-module OBJECT ${CMAKE_SOURCE_DIR}/src/fmt.cc) - #target_compile_features(test-module PUBLIC cxx_std_11) - #target_include_directories(test-module PUBLIC - # $) - #enable_module(test-module) - - #add_fmt_test(module-test MODULE test-main.cc) - #if (MSVC) - # target_compile_options(test-module PRIVATE /utf-8 /Zc:__cplusplus - # /Zc:externConstexpr /Zc:inline) - # target_compile_options(module-test PRIVATE /utf-8 /Zc:__cplusplus - # /Zc:externConstexpr /Zc:inline) - #endif () + # Module tests are currently disabled. + # add_fmt_test(module-test MODULE test-main.cc) + # target_link_libraries(module-test fmt-module) endif () if (NOT DEFINED MSVC_STATIC_RUNTIME AND MSVC) @@ -113,7 +95,7 @@ if (NOT DEFINED MSVC_STATIC_RUNTIME AND MSVC) set(MSVC_STATIC_RUNTIME ON) break() endif () - endforeach() + endforeach () endif () if (NOT MSVC_STATIC_RUNTIME)