cmake: Fix some details of Clang on Windows.

This commit is contained in:
Ryan Pavlik 2022-07-01 11:39:11 -05:00
parent d0b00c7d23
commit f4cc2f3bf4
2 changed files with 6 additions and 2 deletions

View file

@ -4,10 +4,14 @@
if(NOT MSVC)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
set(CMAKE_C_FLAGS
"${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types"
"${CMAKE_C_FLAGS} -Werror-implicit-function-declaration -Werror=incompatible-pointer-types"
)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Werror=int-conversion")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic -Wall -Wextra -Wno-unused-parameter")
endif()
if(NOT WIN32)
# Even clang's gnu-style driver on windows doesn't accept this argument.
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--no-undefined")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -Wl,--no-undefined")

View file

@ -35,7 +35,7 @@ else()
)
endif()
if(NOT MSVC)
if(NOT WIN32)
# Force the main "negotiate" symbol's inclusion
# and use a version script to ensure that's the only one we expose.
set_property(