From 330f5aebdfa427dedcb9cc2c7d4f094cbe48c456 Mon Sep 17 00:00:00 2001 From: Sergio Martins Date: Fri, 9 Jul 2021 22:26:01 +0100 Subject: [PATCH] cmake: Add -Wundef --- CMakeLists.txt | 2 +- tests/tst_docks.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 089177ae..9f4873f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -179,7 +179,7 @@ macro(set_compiler_flags targetName) # Enable -Werror if(NOT MSVC AND ${PROJECT_NAME}_WERROR) - target_compile_options(${targetName} PRIVATE -Werror -Wno-error=deprecated-declarations) + target_compile_options(${targetName} PRIVATE -Werror -Wundef -Wno-error=deprecated-declarations) endif() endmacro() diff --git a/tests/tst_docks.cpp b/tests/tst_docks.cpp index f40b5df9..da3e1ef2 100644 --- a/tests/tst_docks.cpp +++ b/tests/tst_docks.cpp @@ -6919,7 +6919,7 @@ void TestDocks::tst_dragByTabBar() m->resize(osWindowMinWidth(), 200); dock2->addDockWidgetAsTab(dock3); -#if KDDOCKWIDGETS_QTWIDGETS +#if defined(KDDOCKWIDGETS_QTWIDGETS) if (documentMode) static_cast( static_cast(dock2->dptr()->frame())->tabWidget()->asWidget())