Clang: produce fewer warnings (all caused by boost headers)

main
Adriaan de Groot 7 years ago
parent 866d338894
commit 6924bd7d23

@ -70,6 +70,7 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
# mark_thirdparty_code( <file> [<file>...] )
# to switch off warnings for those sources.
set( SUPPRESS_3RDPARTY_WARNINGS "-Wno-everything" )
set( SUPPRESS_BOOST_WARNINGS " -Wno-zero-as-null-pointer-constant -Wno-disabled-macro-expansion" )
set( CMAKE_CXX_FLAGS_DEBUG "-g" )
set( CMAKE_CXX_FLAGS_MINSIZEREL "-Os -DNDEBUG" )
@ -84,6 +85,7 @@ else()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
set( SUPPRESS_3RDPARTY_WARNINGS "" )
set( SUPPRESS_BOOST_WARNINGS "" )
endif()
macro(mark_thirdparty_code)

@ -46,6 +46,9 @@ if( WITH_PYTHON )
PythonJob.cpp
PythonJobApi.cpp
)
set_source_files_properties( PythonJob.cpp
PROPERTIES COMPILE_FLAGS ${SUPPRESS_BOOST_WARNINGS}
)
include_directories(${PYTHON_INCLUDE_DIRS})
link_directories(${PYTHON_LIBRARIES})

Loading…
Cancel
Save