mirror of
https://github.com/parchlinux/calamares.git
synced 2025-07-04 21:05:37 -04:00
Reduce warnings from moc-generated code
- The auto-generated code produces a lot of warnings from Clang 8; this obscures the more meaningful warnings from actual Calamares code, so tone the warnings down. - For Clang, set CALAMARES_MOC_OPTIONS. - Add convenience CMake function for automoccing. It applies the options as needed to a given target.
This commit is contained in:
parent
cef2f50510
commit
bdb7bf71a8
5 changed files with 48 additions and 6 deletions
|
@ -84,10 +84,10 @@ endif()
|
|||
add_library( calamares SHARED ${libSources} ${kdsagSources} ${utilsSources} )
|
||||
set_target_properties( calamares
|
||||
PROPERTIES
|
||||
AUTOMOC TRUE
|
||||
VERSION ${CALAMARES_VERSION_SHORT}
|
||||
SOVERSION ${CALAMARES_VERSION_SHORT}
|
||||
)
|
||||
calamares_automoc( calamares )
|
||||
|
||||
target_link_libraries( calamares
|
||||
LINK_PRIVATE
|
||||
|
@ -114,7 +114,7 @@ if ( ECM_FOUND AND BUILD_TESTING )
|
|||
Qt5::Core
|
||||
Qt5::Test
|
||||
)
|
||||
set_target_properties( libcalamarestest PROPERTIES AUTOMOC TRUE )
|
||||
calamares_automoc( libcalamarestest )
|
||||
endif()
|
||||
|
||||
# Make symlink lib/calamares/libcalamares.so to lib/libcalamares.so.VERSION so
|
||||
|
|
4
src/libcalamares/utils/moc-warnings.h
Normal file
4
src/libcalamares/utils/moc-warnings.h
Normal file
|
@ -0,0 +1,4 @@
|
|||
#ifdef __clang__
|
||||
#pragma clang diagnostic ignored "-Wextra-semi-stmt"
|
||||
#pragma clang diagnostic ignored "-Wredundant-parens"
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue