Cleanup module test

This commit is contained in:
Victor Zverovich 2026-03-03 12:11:52 -08:00
parent 43d4810ba9
commit 011b24123b
2 changed files with 5 additions and 23 deletions

View File

@ -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.")

View File

@ -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
# $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>)
#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)