OSDN Git Service

fix warnings about undefined pre-processor definitions
authorIvailo Monev <xakepa10@gmail.com>
Tue, 24 May 2016 13:13:19 +0000 (13:13 +0000)
committerIvailo Monev <xakepa10@gmail.com>
Tue, 24 May 2016 13:13:19 +0000 (13:13 +0000)
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
CMakeLists.txt
mkspecs/tests/tests.cmake

index 36ee72b..26d90f7 100644 (file)
@@ -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
index 9687e72..bed79b2 100644 (file)
@@ -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)