Skip to content

Commit

Permalink
Allow clang-cl to compile
Browse files Browse the repository at this point in the history
  • Loading branch information
dunhor committed Jun 7, 2024
1 parent 6c467b7 commit ab9beab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ endif ()
# aggressive about diagnosing build problems; this can get
# relaxed somewhat in final shipping versions.
IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
CMAKE_C_COMPILER_ID MATCHES "^Clang$" AND NOT MSVC)
SET(CMAKE_REQUIRED_FLAGS "-Wall -Wformat -Wformat-security")
#################################################################
# Set compile flags for all build types.
Expand Down Expand Up @@ -144,7 +144,7 @@ IF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-dead_strip")
ENDIF(NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
ENDIF (CMAKE_C_COMPILER_ID MATCHES "^GNU$" OR
CMAKE_C_COMPILER_ID MATCHES "^Clang$")
CMAKE_C_COMPILER_ID MATCHES "^Clang$" AND NOT MSVC)
IF (CMAKE_C_COMPILER_ID MATCHES "^XL$")
SET(CMAKE_C_COMPILER "xlc_r")
SET(CMAKE_REQUIRED_FLAGS "-qflag=e:e -qformat=sec")
Expand Down

0 comments on commit ab9beab

Please sign in to comment.