From d8b2b2fe42c27a0ae9cf45fb6ec2c2567ce4a36c Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Tue, 24 May 2016 13:13:19 +0000 Subject: [PATCH] fix warnings about undefined pre-processor definitions Signed-off-by: Ivailo Monev --- CMakeLists.txt | 12 ++++++++---- mkspecs/tests/tests.cmake | 2 +- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 36ee72b60..26d90f70c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,11 +19,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin") set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib") set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/staticlib") -include(CheckCXXCompilerFlag) -include(CheckCXXSourceCompiles) include(CheckIncludeFile) -include(CheckIncludeFiles) -include(CheckTypeSize) include(FeatureSummary) include(KatieMacros) include(KatieBuildMacros) @@ -204,6 +200,14 @@ if(NOT KATIE_PLATFORM STREQUAL "integrity" AND NOT MINGW) ) endif() +# for 3rd party source used in help and test components +check_include_file(sys/time.h HAVE_SYS_TIME_H) +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() + configure_file( ${CMAKE_SOURCE_DIR}/src/core/global/qconfig.h.cmake ${CMAKE_BINARY_DIR}/include/QtCore/qconfig.h diff --git a/mkspecs/tests/tests.cmake b/mkspecs/tests/tests.cmake index 9687e7228..bed79b2ca 100644 --- a/mkspecs/tests/tests.cmake +++ b/mkspecs/tests/tests.cmake @@ -79,4 +79,4 @@ endmacro() katie_misc_test(stl STL) include(CheckTypeSize) -check_type_size(size_t QT_POINTER_SIZE) \ No newline at end of file +check_type_size(size_t QT_POINTER_SIZE) -- 2.11.0