mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-05-25 23:21:15 -03:00
fixup! Put -Wno-redundant-move behind a compiler check
Use -Werror in the CMake test because the compiler check passes even if warnings are emitted.
This commit is contained in:
@@ -13,7 +13,9 @@ if(APPLE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
check_cxx_compiler_flag("-Wno-redundant-move" HAS_NO_REDUNDANT_MOVE)
|
||||
# An unrecognized flag is usually a warning and not an error, which CMake apparently does
|
||||
# not pick up on. Combine it with -Werror to determine if it's actually supported.
|
||||
check_cxx_compiler_flag("-Wno-redundant-move -Werror" HAS_NO_REDUNDANT_MOVE)
|
||||
if (HAS_NO_REDUNDANT_MOVE)
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-redundant-move")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user