cmake: more compiler warnings
This commit is contained in:
parent
ee0c011822
commit
7e5e19b6a5
2 changed files with 13 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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})
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue