From 21ab73316fe56428b28ed53a2bd020cfa6924d6c Mon Sep 17 00:00:00 2001 From: Paweł Wegner Date: Sun, 16 May 2021 13:52:06 +0200 Subject: cmake: tweak for clang-cl This change allows libressl to be built with clang-cl. --- CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 838b7e8..06d9186 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -113,7 +113,6 @@ if (CMAKE_COMPILER_IS_GNUCC OR CMAKE_C_COMPILER_ID MATCHES "Clang") endif() if(WIN32) - add_definitions(-Drestrict) add_definitions(-D_CRT_SECURE_NO_WARNINGS) add_definitions(-D_CRT_DEPRECATED_NO_WARNINGS) add_definitions(-D_REENTRANT -D_POSIX_THREAD_SAFE_FUNCTIONS) @@ -125,7 +124,7 @@ endif() if(MSVC) add_definitions(-Dinline=__inline) message(STATUS "Using [${CMAKE_C_COMPILER_ID}] compiler") - if(CMAKE_C_COMPILER_ID MATCHES "MSVC") + if(CMAKE_C_COMPILER_ID MATCHES "MSVC" OR CMAKE_C_COMPILER_ID MATCHES "Clang") set(MSVC_DISABLED_WARNINGS_LIST "C4018" # 'expression' : signed/unsigned mismatch "C4057" # 'operator' : 'identifier1' indirection to -- cgit v1.2.3-55-g6feb