summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorAdriaan de Groot <groot@kde.org>2019-04-17 12:19:12 +0200
committerAdriaan de Groot <groot@kde.org>2019-04-18 12:06:09 +0200
commitbdb7bf71a8ed1cef055cdc50a648ce7cd3e33db8 (patch)
tree647a144b02f060efba45936a940b1b7c1ab263fb /CMakeLists.txt
parentcef2f50510aefa0fd0853c32c957cd4bbda1be6a (diff)
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.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt3
1 files changed, 3 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c9dddb547..ce627fc9b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -208,6 +208,8 @@ if( CMAKE_CXX_COMPILER_ID MATCHES "Clang" )
set( CMAKE_TOOLCHAIN_PREFIX "llvm-" )
set( CMAKE_SHARED_LINKER_FLAGS "-Wl,--no-undefined" )
+
+ set( CALAMARES_AUTOMOC_OPTIONS "-butils/moc-warnings.h" )
else()
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--no-undefined" )
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wl,--fatal-warnings -Wnon-virtual-dtor -Woverloaded-virtual -Werror=return-type" )
@@ -509,6 +511,7 @@ install(
"CMakeModules/CalamaresAddLibrary.cmake"
"CMakeModules/CalamaresAddBrandingSubdirectory.cmake"
"CMakeModules/CalamaresAddTranslations.cmake"
+ "CMakeModules/CalamaresAutomoc.cmake"
"CMakeModules/CMakeColors.cmake"
DESTINATION
"${CMAKE_INSTALL_CMAKEDIR}"