mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 22:14:53 +00: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:
parent
1ca05d32d3
commit
fb4967945a
1 changed files with 3 additions and 1 deletions
|
@ -13,7 +13,9 @@ if(APPLE)
|
||||||
endif()
|
endif()
|
||||||
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)
|
if (HAS_NO_REDUNDANT_MOVE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-redundant-move")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-redundant-move")
|
||||||
endif()
|
endif()
|
||||||
|
|
Loading…
Reference in a new issue