forked from osmocom/wireshark
Get Clang to report errors for unknown linker flags.
Change-Id: Id8e77b6b521acc1ba684823211d6c09d0e5c111c Reviewed-on: https://code.wireshark.org/review/13566 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
e57bb1919c
commit
8049df7943
|
@ -41,6 +41,13 @@ MACRO (CHECK_C_LINKER_FLAG _FLAG _RESULT)
|
||||||
# passed a flag it doesn't handle.
|
# passed a flag it doesn't handle.
|
||||||
#
|
#
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "/WX")
|
set(CMAKE_REQUIRED_LIBRARIES "/WX")
|
||||||
|
elseif(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
||||||
|
#
|
||||||
|
# We'll be running the linker through the compiler driver, so
|
||||||
|
# we may need to pass -Werror=unknown-warning-option to have it
|
||||||
|
# fail, rather than just complaining and driving on, if it's
|
||||||
|
# passed a flag it doesn't handle.
|
||||||
|
set(CMAKE_REQUIRED_LIBRARIES "-Werror=unknown-warning-option")
|
||||||
endif()
|
endif()
|
||||||
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${_FLAG}")
|
set(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES} ${_FLAG}")
|
||||||
message(status "check linker flag - test linker flags: ${_FLAG}")
|
message(status "check linker flag - test linker flags: ${_FLAG}")
|
||||||
|
|
Loading…
Reference in New Issue