Skip to content

Commit

Permalink
suppress Qt4 warning on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
Albert.Zhou committed Nov 24, 2013
1 parent 589fb7f commit 3968c12
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 19 deletions.
5 changes: 5 additions & 0 deletions cmake/QtChooser.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,8 @@ macro(qt_use_modules)
target_link_libraries(${ARGV0} ${QT_LIBRARIES})
endif()
endmacro()

macro(qt_suppress_warnings)
set_target_properties(${ARGV0} PROPERTIES
COMPILE_FLAGS "-Wno-#warnings")
endmacro()
1 change: 1 addition & 0 deletions lib/aggregation/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ set(aggr_SOURCES
include(QtChooser)
add_library(aggregation SHARED ${aggr_SOURCES} ${aggr_HEADERS})
qt_use_modules(aggregation Core)
qt_suppress_warnings(aggregation)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
1 change: 1 addition & 0 deletions lib/extensionsystem/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ qt_add_resources(extsys_RC ${extsys_RESOURCES})
message(STATUS ${extsys_RC})
add_library(extensionsystem SHARED ${extsys_SOURCES} ${extsys_HEADERS} ${extsys_FORM_HEADERS} ${extsys_RC})
qt_use_modules(extensionsystem)
qt_suppress_warnings(extensionsystem)

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
Expand Down
19 changes: 1 addition & 18 deletions lib/quazip/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,10 @@ project (QuaZip)
file(GLOB SRCS "*.c" "*.cpp")
file(GLOB PUBLIC_HEADERS "*.h")

#find_package(ZLIB)
#if(NOT ZLIB_FOUND)
# message("ZLIB not found, quazip using local: ${clucene-ext_SOURCE_DIR}/zlib")
# set(ZLIB_INCLUDE_DIR ${clucene-ext_SOURCE_DIR}/zlib)
# set(ZLIB_LIBRARY ${clucene-ext_BINARY_DIR})
#endif(NOT ZLIB_FOUND)

#INCLUDE_DIRECTORIES( ${ZLIB_INCLUDE_DIR} )

#find_package(ZLIB)
#if(NOT ZLIB_FOUND)
# SET(ZLIB_INCLUDE_DIRS "${QT_ROOT}/src/3rdparty/zlib" CACHE STRING "Path to ZLIB headers of Qt")
# SET(ZLIB_LIBRARIES "")
# IF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
# MESSAGE("Please specify a valid zlib include dir")
# ENDIF(NOT EXISTS "${ZLIB_INCLUDE_DIRS}/zlib.h")
#ENDIF(NOT ZLIB_FOUND)

include(QtChooser)
add_library(quazip STATIC ${SRCS} ${PUBLIC_HEADERS})
qt_use_modules(quazip)
qt_suppress_warnings(quazip)

# set all include directories for in and out of source builds
include_directories(
Expand Down
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ if(UNIX)
endif()
endif()

qt_use_modules(${PROJECT_NAME})
qt_use_modules(wiznote)
qt_suppress_warnings(wiznote)

include_directories(
${CMAKE_CURRENT_SOURCE_DIR}
Expand Down
1 change: 1 addition & 0 deletions src/plugins/coreplugin/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ include(QtChooser)
qt_add_ui(coreplugin_FORM_HEADERS ${coreplugin_FORMS})
add_library(coreplugin SHARED ${coreplugin_SOURCES} ${coreplugin_HEADERS} ${coreplugin_FORM_HEADERS} ${coreplugin_SPEC})
qt_use_modules(coreplugin)
qt_suppress_warnings(coreplugin)

add_definitions(-DCORE_LIBRARY)

Expand Down
1 change: 1 addition & 0 deletions src/plugins/helloworld/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ set(helloworld_SPEC
include(QtChooser)
add_library(helloworld SHARED ${helloworld_SOURCES} ${helloworld_HEADERS} ${helloworld_SPEC})
qt_use_modules(helloworld)
qt_suppress_warnings(helloworld)

# set all include directories for in and out of source builds
include_directories(
Expand Down

0 comments on commit 3968c12

Please sign in to comment.