mirror of
https://github.com/fmtlib/fmt.git
synced 2026-04-30 19:09:22 +08:00
Cleanup module test
This commit is contained in:
parent
43d4810ba9
commit
011b24123b
@ -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.")
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user