Skip to content
Permalink
Browse files

Add option to suppress SIP warnings (#3230)

to fix travis builds for OSX. Yay
  • Loading branch information
m-kuhn committed Jun 23, 2016
1 parent b63f788 commit 4b6d38c4c49f2badf48c934ed6b771440fee0450
Showing with 20 additions and 6 deletions.
  1. +14 −6 ci/travis/osx/install.sh
  2. +6 −0 cmake/SIPMacros.cmake
@@ -18,9 +18,17 @@ cd build
#no PGTEST for OSX - can't get postgres to start with brew install
#no APIDOC for OSX - doxygen tests and warnings are covered by linux build
#no deprecated-declarations warnings... requires QGIS ported to Cocoa
cmake -DWITH_SERVER=ON -DWITH_STAGED_PLUGINS=ON -DWITH_GRASS=OFF \
-DSUPPRESS_QT_WARNINGS=ON -DENABLE_MODELTEST=ON -DENABLE_PGTEST=OFF \
-DWITH_QWTPOLAR=OFF -DWITH_PYSPATIALITE=ON \
-DQWT_INCLUDE_DIR=/usr/local/opt/qwt/lib/qwt.framework/Headers/ \
-DQWT_LIBRARY=/usr/local/opt/qwt/lib/qwt.framework/qwt \
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" ..
cmake \
-DWITH_SERVER=ON \
-DWITH_STAGED_PLUGINS=ON \
-DWITH_GRASS=OFF \
-DSUPPRESS_SIP_WARNINGS=ON \
-DSUPPRESS_QT_WARNINGS=ON \
-DENABLE_MODELTEST=ON \
-DENABLE_PGTEST=OFF \
-DWITH_QWTPOLAR=OFF \
-DWITH_PYSPATIALITE=ON \
-DQWT_INCLUDE_DIR=/usr/local/opt/qwt/lib/qwt.framework/Headers/ \
-DQWT_LIBRARY=/usr/local/opt/qwt/lib/qwt.framework/qwt \
-DCMAKE_CXX_FLAGS="-Wno-deprecated-declarations" \
..
@@ -93,13 +93,19 @@ MACRO(GENERATE_SIP_PYTHON_MODULE_CODE MODULE_NAME MODULE_SIP CPP_FILES)
ENDIF(PEDANTIC)

SET(SIPCMD ${SIP_BINARY_PATH} ${_sip_tags} -w -e ${_sip_x} ${SIP_EXTRA_OPTIONS} -j ${SIP_CONCAT_PARTS} -c ${CMAKE_CURRENT_BINARY_DIR}/${_module_path} ${_sip_includes} ${_abs_module_sip})
SET(SUPPRESS_SIP_WARNINGS FALSE CACHE BOOL "Hide SIP warnings")
MARK_AS_ADVANCED(SUPPRESS_SIP_WARNINGS)
IF(SUPPRESS_SIP_WARNINGS)
SET(SIPCMD ${SIPCMD} 2> /dev/null || true)
ENDIF(SUPPRESS_SIP_WARNINGS)

ADD_CUSTOM_COMMAND(
OUTPUT ${_sip_output_files}
COMMAND ${CMAKE_COMMAND} -E echo ${message}
COMMAND ${CMAKE_COMMAND} -E touch ${_sip_output_files}
COMMAND ${SIPCMD}
DEPENDS ${_abs_module_sip} ${SIP_EXTRA_FILES_DEPEND}
VERBATIM
)

ADD_CUSTOM_TARGET(generate_sip_${MODULE_NAME}_cpp_files DEPENDS ${_sip_output_files})

0 comments on commit 4b6d38c

Please sign in to comment.
You can’t perform that action at this time.