File tree Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Expand file tree Collapse file tree 5 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -643,7 +643,7 @@ function(add_libc_hermetic test_name)
643
643
cmake_parse_arguments (
644
644
"HERMETIC_TEST"
645
645
"IS_GPU_BENCHMARK" # Optional arguments
646
- "SUITE" # Single value arguments
646
+ "SUITE;CXX_STANDARD " # Single value arguments
647
647
"SRCS;HDRS;DEPENDS;ARGS;ENV;COMPILE_OPTIONS;LINK_LIBRARIES;LOADER_ARGS" # Multi-value arguments
648
648
${ARGN}
649
649
)
@@ -720,10 +720,14 @@ function(add_libc_hermetic test_name)
720
720
${HERMETIC_TEST_SRCS}
721
721
${HERMETIC_TEST_HDRS}
722
722
)
723
+
724
+ if (NOT HERMETIC_TEST_CXX_STANDARD )
725
+ set (HERMETIC_TEST_CXX_STANDARD ${CMAKE_CXX_STANDARD} )
726
+ endif ()
723
727
set_target_properties (${fq_build_target_name}
724
728
PROPERTIES
725
729
RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
726
- # OUTPUT_NAME ${fq_target_name }
730
+ CXX_STANDARD ${HERMETIC_TEST_CXX_STANDARD }
727
731
)
728
732
729
733
target_include_directories (${fq_build_target_name} SYSTEM PRIVATE ${LIBC_INCLUDE_DIR} )
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ set(TARGET_LIBC_ENTRYPOINTS
261
261
libc.src.time.nanosleep
262
262
libc.src.time.strftime
263
263
libc.src.time.strftime_l
264
+ libc.src.time.mktime
264
265
265
266
# wchar.h entrypoints
266
267
libc.src.wchar.wcslen
Original file line number Diff line number Diff line change @@ -261,6 +261,7 @@ set(TARGET_LIBC_ENTRYPOINTS
261
261
libc.src.time.nanosleep
262
262
libc.src.time.strftime
263
263
libc.src.time.strftime_l
264
+ libc.src.time.mktime
264
265
265
266
# wchar.h entrypoints
266
267
libc.src.wchar.wcslen
Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ add_libc_unittest(
148
148
libc.src.time.time_constants
149
149
)
150
150
151
- add_libc_unittest (
151
+ add_libc_test (
152
152
mktime_test
153
153
SUITE
154
154
libc_time_unittests
Original file line number Diff line number Diff line change @@ -18,6 +18,10 @@ using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Fails;
18
18
using LIBC_NAMESPACE::testing::ErrnoSetterMatcher::Succeeds;
19
19
using LIBC_NAMESPACE::time_constants::Month;
20
20
21
+ #ifndef EOVERFLOW
22
+ #define EOVERFLOW 0
23
+ #endif
24
+
21
25
static inline constexpr int tm_year (int year) {
22
26
return year - LIBC_NAMESPACE::time_constants::TIME_YEAR_BASE;
23
27
}
You can’t perform that action at this time.
0 commit comments