mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-26 09:28:21 +00:00
Skip the scan-test if strptime isn't defined (#3184)
cygwin and embedded systems. By default newlib doesn't provide strptime in time.h because it was added in a later X/Open versions. Issue: #3178
This commit is contained in:
parent
7df30f91ae
commit
c7980542d3
@ -1,5 +1,7 @@
|
|||||||
add_subdirectory(gtest)
|
add_subdirectory(gtest)
|
||||||
|
|
||||||
|
include(CheckSymbolExists)
|
||||||
|
|
||||||
set(TEST_MAIN_SRC test-main.cc gtest-extra.cc gtest-extra.h util.cc)
|
set(TEST_MAIN_SRC test-main.cc gtest-extra.cc gtest-extra.h util.cc)
|
||||||
add_library(test-main STATIC ${TEST_MAIN_SRC})
|
add_library(test-main STATIC ${TEST_MAIN_SRC})
|
||||||
target_include_directories(test-main PUBLIC
|
target_include_directories(test-main PUBLIC
|
||||||
@ -75,7 +77,14 @@ if (MSVC)
|
|||||||
endif()
|
endif()
|
||||||
add_fmt_test(printf-test)
|
add_fmt_test(printf-test)
|
||||||
add_fmt_test(ranges-test ranges-odr-test.cc)
|
add_fmt_test(ranges-test ranges-odr-test.cc)
|
||||||
add_fmt_test(scan-test)
|
|
||||||
|
check_symbol_exists(strptime "time.h" HAVE_STRPTIME)
|
||||||
|
if (HAVE_STRPTIME)
|
||||||
|
add_fmt_test(scan-test)
|
||||||
|
else()
|
||||||
|
message(WARNING "Skipping scan-test due to missing strptime dependency.")
|
||||||
|
endif ()
|
||||||
|
|
||||||
add_fmt_test(std-test)
|
add_fmt_test(std-test)
|
||||||
try_compile(compile_result_unused
|
try_compile(compile_result_unused
|
||||||
${CMAKE_CURRENT_BINARY_DIR}
|
${CMAKE_CURRENT_BINARY_DIR}
|
||||||
|
Loading…
Reference in New Issue
Block a user