summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
author2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-01 14:59:15 +1000
committer2 * r + 2 * t <61896496+soramanew@users.noreply.github.com>2025-09-01 14:59:15 +1000
commit7e5e19b6a5ea5d25718e0d4c530b193806d524b3 (patch)
tree7b2ddc0530d45ecdf2087c27d845ff65cee226b9 /CMakeLists.txt
parentplugin/fsm: lazy entriesChanged (diff)
downloadcaelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.tar.gz
caelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.tar.bz2
caelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.zip
cmake: more compiler warnings
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7050078..4a16642 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,6 +30,7 @@ project(caelestia-shell VERSION ${VERSION} LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib")
set(DISTRIBUTOR "Unset" CACHE STRING "Distributor")
@@ -38,7 +39,17 @@ set(INSTALL_LIBDIR "usr/lib/caelestia" CACHE STRING "Library install dir")
set(INSTALL_QMLDIR "usr/lib/qt6/qml" CACHE STRING "QML install dir")
set(INSTALL_QSCONFDIR "etc/xdg/quickshell/caelestia" CACHE STRING "Quickshell config install dir")
-add_compile_options(-Wall -Wextra)
+add_compile_options(
+ -Wall -Wextra -Wpedantic -Wshadow -Wconversion
+ -Wold-style-cast -Wnull-dereference -Wdouble-promotion
+ -Wformat=2 -Wfloat-equal -Woverloaded-virtual
+ -Wsign-conversion -Wredundant-decls -Wswitch
+ -Wunreachable-code
+)
+
+if(CMAKE_CXX_COMPILER_ID MATCHES "Clang")
+ add_compile_options(-Wunused-lambda-capture)
+endif()
if("assets" IN_LIST ENABLE_MODULES)
add_subdirectory(assets/cpp)