Cleanup module test
This commit is contained in:
@@ -88,7 +88,7 @@ set_verbose(FMT_INC_DIR ${CMAKE_INSTALL_INCLUDEDIR} CACHE STRING
|
|||||||
|
|
||||||
set(FMT_DEBUG_POSTFIX d CACHE STRING "Debug library postfix.")
|
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)
|
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])")
|
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.")
|
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)
|
target_link_libraries(perf-sanity fmt::fmt)
|
||||||
|
|
||||||
if (FMT_MODULE)
|
if (FMT_MODULE)
|
||||||
# The module-test.cc needs some work and is not working yet.
|
# Module tests are currently disabled.
|
||||||
# For now We simply just return
|
# add_fmt_test(module-test MODULE test-main.cc)
|
||||||
# so that the other tests are not affected.
|
# target_link_libraries(module-test fmt-module)
|
||||||
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 ()
|
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT DEFINED MSVC_STATIC_RUNTIME AND MSVC)
|
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)
|
set(MSVC_STATIC_RUNTIME ON)
|
||||||
break()
|
break()
|
||||||
endif ()
|
endif ()
|
||||||
endforeach()
|
endforeach ()
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
if (NOT MSVC_STATIC_RUNTIME)
|
if (NOT MSVC_STATIC_RUNTIME)
|
||||||
|
|||||||
Reference in New Issue
Block a user