summaryrefslogtreecommitdiff
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
parentplugin/fsm: lazy entriesChanged (diff)
downloadcaelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.tar.gz
caelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.tar.bz2
caelestia-shell-7e5e19b6a5ea5d25718e0d4c530b193806d524b3.zip
cmake: more compiler warnings
-rw-r--r--CMakeLists.txt13
-rw-r--r--assets/cpp/CMakeLists.txt2
2 files changed, 13 insertions, 2 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)
diff --git a/assets/cpp/CMakeLists.txt b/assets/cpp/CMakeLists.txt
index 8e4532f..cfbf7b1 100644
--- a/assets/cpp/CMakeLists.txt
+++ b/assets/cpp/CMakeLists.txt
@@ -14,6 +14,6 @@ install(TARGETS version DESTINATION ${INSTALL_LIBDIR})
# Beat detector
add_executable(beat_detector beat-detector.cpp)
-target_include_directories(beat_detector PRIVATE ${PIPEWIRE_INCLUDE_DIRS} ${AUBIO_INCLUDE_DIRS})
+target_include_directories(beat_detector SYSTEM PRIVATE ${PIPEWIRE_INCLUDE_DIRS} ${AUBIO_INCLUDE_DIRS})
target_link_libraries(beat_detector PRIVATE ${PIPEWIRE_LIBRARIES} ${AUBIO_LIBRARIES})
install(TARGETS beat_detector DESTINATION ${INSTALL_LIBDIR})