Skip to content

Commit

Permalink
Run CMake with -Werror=dev in CI (#7322)
Browse files Browse the repository at this point in the history
  • Loading branch information
DomClark committed Jul 6, 2024
1 parent 0384813 commit bdd94ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
runs-on: ${{ matrix.os }}
env:
CMAKE_OPTS: >-
-Werror=dev
-DUSE_WERROR=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DUSE_COMPILE_CACHE=ON
Expand Down Expand Up @@ -176,6 +177,7 @@ jobs:
container: ghcr.io/lmms/linux.mingw:20.04
env:
CMAKE_OPTS: >-
-Werror=dev
-DUSE_WERROR=ON
-DCMAKE_BUILD_TYPE=RelWithDebInfo
-DUSE_COMPILE_CACHE=ON
Expand Down Expand Up @@ -293,6 +295,7 @@ jobs:
-B build `
-G Ninja `
--toolchain C:/vcpkg/scripts/buildsystems/vcpkg.cmake `
-Werror=dev `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DUSE_COMPILE_CACHE=ON `
-DUSE_WERROR=ON `
Expand Down
16 changes: 9 additions & 7 deletions cmake/modules/FindPulseAudio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,15 @@ ENDIF (PULSEAUDIO_INCLUDE_DIR AND PULSEAUDIO_LIBRARIES)
IF (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
INCLUDE(FindPkgConfig)
pkg_check_modules(PA libpulse)
set(_PASIncDir ${PA_INCLUDE_DIRS})
set(_PASLinkDir ${PA_LIBRARY_DIRS})
set(_PASLinkFlags ${PA_LDFLAGS})
set(_PASCflags ${PA_CFLAGS})
SET(PULSEAUDIO_DEFINITIONS ${_PASCflags})
find_package(PkgConfig QUIET)
if(PKG_CONFIG_FOUND)
pkg_check_modules(PA libpulse)
set(_PASIncDir ${PA_INCLUDE_DIRS})
set(_PASLinkDir ${PA_LIBRARY_DIRS})
set(_PASLinkFlags ${PA_LDFLAGS})
set(_PASCflags ${PA_CFLAGS})
set(PULSEAUDIO_DEFINITIONS ${_PASCflags})
endif()
ENDIF (NOT WIN32)

FIND_PATH(PULSEAUDIO_INCLUDE_DIR pulse/pulseaudio.h
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindSndio.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ check_library_exists(sndio sio_open "${SNDIO_LIBRARY_DIR}" HAVE_SIO_OPEN)
find_path(SNDIO_INCLUDE_DIR sndio.h)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SNDIO DEFAULT_MSG SNDIO_LIBRARY SNDIO_INCLUDE_DIR HAVE_SIO_OPEN)
find_package_handle_standard_args(Sndio DEFAULT_MSG SNDIO_LIBRARY SNDIO_INCLUDE_DIR HAVE_SIO_OPEN)

if(SNDIO_FOUND)
set(SNDIO_INCLUDE_DIRS "${SNDIO_INCLUDE_DIR}")
Expand Down
2 changes: 1 addition & 1 deletion cmake/modules/FindSoundIo.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ find_path(SOUNDIO_INCLUDE_DIR NAMES soundio/soundio.h)
find_library(SOUNDIO_LIBRARY NAMES soundio)

include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(SOUNDIO DEFAULT_MSG SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)
find_package_handle_standard_args(SoundIo DEFAULT_MSG SOUNDIO_LIBRARY SOUNDIO_INCLUDE_DIR)

mark_as_advanced(SOUNDIO_INCLUDE_DIR SOUNDIO_LIBRARY)

0 comments on commit bdd94ec

Please sign in to comment.