Clang: be more explicit about marking third-party code.

- This is only a partial solution to warnings caused by third-party
   code, since #including the headers from other sources won't apply
   the warning-suppressions.
 - Flags are not applied when building the source as part of a larger
   target, but are on re-building just one object (it seems -- CMake
   issue to track down).
This commit is contained in:
Adriaan de Groot 2017-09-21 04:53:09 -04:00
parent d89b17a244
commit 40c49bd50d
3 changed files with 20 additions and 6 deletions

View file

@ -32,8 +32,7 @@ set( kdsagSources
kdsingleapplicationguard/kdtoolsglobal.cpp
kdsingleapplicationguard/kdlockedsharedmemorypointer.cpp
)
set_source_files_properties( ${kdsagSources}
PROPERTIES COMPILE_FLAGS "${SUPPRESS_3RDPARTY_WARNINGS}" )
mark_thirdparty_code( ${kdsagSources} )
include_directories(
${CMAKE_CURRENT_BINARY_DIR}

View file

@ -1,6 +1,6 @@
project( libcalamaresui CXX )
list( APPEND calamaresui_SOURCES
set( calamaresui_SOURCES
modulesystem/CppJobModule.cpp
modulesystem/Module.cpp
modulesystem/ModuleManager.cpp
@ -29,7 +29,15 @@ list( APPEND calamaresui_SOURCES
ViewManager.cpp
)
list( APPEND calamaresui_UI
# Don't warn about third-party sources
mark_thirdparty_code(
utils/ImageRegistry.cpp
utils/qjsonitem.cpp
utils/qjsonmodel.cpp
widgets/waitingspinnerwidget.cpp
)
set( calamaresui_UI
utils/DebugWindow.ui
)