assume <sys/time.h> is available

already used in many places unconditionally

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2020-11-20 21:21:53 +00:00
parent a5560ffd94
commit 30697650d5
2 changed files with 3 additions and 10 deletions

View file

@ -352,9 +352,6 @@ add_definitions(
# for symbols mangling while unwinding in core component
check_include_file_cxx(cxxabi.h HAVE_CXXABI)
# for 3rd party source used in test component
check_include_file(sys/time.h HAVE_SYS_TIME_H)
# stored in qconfig.h.cmake
check_type_size(size_t QT_POINTER_SIZE)

View file

@ -2,6 +2,9 @@ add_definitions(
-DQT_NO_CAST_TO_ASCII
-DQT_NO_CAST_FROM_ASCII
-DQT_NO_DATASTREAM
# for 3rd party source
-DTIME_WITH_SYS_TIME=1
-DHAVE_SYS_TIME_H
)
set(EXTRA_TEST_LIBS KtCore)
@ -106,13 +109,6 @@ katie_generate_public("${TEST_PUBLIC_HEADERS}" QtTest)
katie_generate_package(KtTest "KtCore")
katie_setup_target(KtTest ${TEST_SOURCES} ${TEST_HEADERS})
# for 3rd party source
if(HAVE_SYS_TIME_H)
add_definitions(-DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_TIME_H)
else()
add_definitions(-DTIME_WITH_SYS_TIME=0)
endif()
add_library(KtTest ${KATIE_TYPE} ${KtTest_SOURCES})
target_link_libraries(KtTest PRIVATE ${EXTRA_TEST_LIBS})
set_target_properties(KtTest PROPERTIES