Skip to content

Commit 0470e5d

Browse files
committed
Fix openal-soft warning flags scope
- target_compile_options(alsoft.common PUBLIC ${C_FLAGS}) propagated strict warnings to all dependents. - Change to PRIVATE so only alsoft.common uses them.
1 parent a535633 commit 0470e5d

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

3rdparty/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,8 @@
189189
- Linking `fmt::fmt` instead `alsoft::fmt`
190190
- Exclude target `alsoft::excommon`
191191
- Fix `al::char_as_u8/al::u8_as_char` in `common/alstring.hpp` with compiler flag: `-fno-char8_t` or `/Zc:char8_t-`
192-
- Disable non‑standard [[clang::nonblocking]] attribute on Win32 to avoid compiler compatibility issues
192+
- Disable non‑standard [[clang::nonblocking]] attribute to avoid compiler compatibility issues
193+
- Restrict warning flags scope to target: `alsoft.common`
193194
- License: LGPL-2.1
194195

195196
## OpenSSL

3rdparty/openal/CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -364,8 +364,7 @@ if(MSVC)
364364
# C4373 - virtual function overrides 'base_function', previous versions of
365365
# the compiler did not override when parameters only differed by
366366
# const/volatile qualifiers
367-
# Axmol spec: Remove /W4 to avoid produces excessive warnings outside Axmol's codebase.
368-
list(APPEND C_FLAGS /wd4127 /wd4324 /wd4373 /utf-8 $<$<COMPILE_LANGUAGE:CXX>:/EHsc>)
367+
list(APPEND C_FLAGS /W4 /wd4127 /wd4324 /wd4373 /utf-8 $<$<COMPILE_LANGUAGE:CXX>:/EHsc>)
369368

370369
if(NOT DXSDK_DIR)
371370
string(REGEX REPLACE "\\\\" "/" DXSDK_DIR "$ENV{DXSDK_DIR}")
@@ -1651,7 +1650,7 @@ endif()
16511650
target_include_directories(alsoft.common
16521651
PUBLIC ${OpenAL_BINARY_DIR} ${OpenAL_SOURCE_DIR}/common ${OpenAL_SOURCE_DIR}/gsl/include)
16531652
target_compile_definitions(alsoft.common PUBLIC ${CPP_DEFS})
1654-
target_compile_options(alsoft.common PUBLIC ${C_FLAGS})
1653+
target_compile_options(alsoft.common PRIVATE ${C_FLAGS})
16551654
target_link_libraries(alsoft.common PUBLIC Threads::Threads ${LINKER_FLAGS} fmt::fmt)
16561655
set_target_properties(alsoft.common PROPERTIES ${ALSOFT_STD_VERSION_PROPS}
16571656
POSITION_INDEPENDENT_CODE TRUE)

0 commit comments

Comments
 (0)