Skip to content

Commit

Permalink
cmake: avoid -Werror with MSVC and XLC (#420)
Browse files Browse the repository at this point in the history
  • Loading branch information
carenas authored Jun 11, 2024
1 parent 3fa0cc4 commit 6c0d9e9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,9 @@ CHECK_C_SOURCE_COMPILES(
)

set(ORIG_CMAKE_REQUIRED_FLAGS ${CMAKE_REQUIRED_FLAGS})
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
if(NOT MSVC AND NOT CMAKE_C_COMPILER_ID STREQUAL "XL")
set(CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS} -Werror")
endif()

CHECK_C_SOURCE_COMPILES(
"#include <stddef.h>
Expand Down

0 comments on commit 6c0d9e9

Please sign in to comment.