This is an automated email from the ASF dual-hosted git repository.
emmenlau pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/thrift.git
The following commit(s) were added to refs/heads/master by this push:
new 7f9abb1 build/cmake/DefinePlatformSpecifc.cmake: Ensure ClangCl on
MSVC is recognized as MSVC (because it does not handle -Wall too well)
7f9abb1 is described below
commit 7f9abb1cc0f4b2793a48f45ddfcf0d2b287cc50c
Author: Mario Emmenlauer <[email protected]>
AuthorDate: Tue Oct 20 15:44:42 2020 +0200
build/cmake/DefinePlatformSpecifc.cmake: Ensure ClangCl on MSVC is
recognized as MSVC (because it does not handle -Wall too well)
---
build/cmake/DefinePlatformSpecifc.cmake | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/build/cmake/DefinePlatformSpecifc.cmake
b/build/cmake/DefinePlatformSpecifc.cmake
index f43f503..84409e6 100644
--- a/build/cmake/DefinePlatformSpecifc.cmake
+++ b/build/cmake/DefinePlatformSpecifc.cmake
@@ -25,13 +25,7 @@ set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "Set debug library
postfix")
# basic options
foreach(lang IN ITEMS C CXX)
- if(CMAKE_${lang}_COMPILER_ID STREQUAL "Clang")
- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wall")
- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -ferror-limit=1")
- elseif(CMAKE_${lang}_COMPILER_ID STREQUAL "GNU")
- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wall -Wextra")
- set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -fmax-errors=1")
- elseif(CMAKE_${lang}_COMPILER_ID STREQUAL "MSVC")
+ if("CMAKE_${lang}_COMPILER_ID" STREQUAL "MSVC" OR
"${CMAKE_${lang}_SIMULATE_ID}" STREQUAL "MSVC")
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /MP") # parallel build
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} /W3") # warning level 3
include(CheckCXXCompilerFlag)
@@ -45,6 +39,12 @@ foreach(lang IN ITEMS C CXX)
set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS}
/execution-charset:utf-8")
endif()
add_definitions("-DUNICODE -D_UNICODE")
+ elseif("CMAKE_${lang}_COMPILER_ID" STREQUAL "Clang")
+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wall")
+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -ferror-limit=1")
+ elseif("CMAKE_${lang}_COMPILER_ID" STREQUAL "GNU")
+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -Wall -Wextra")
+ set(CMAKE_${lang}_FLAGS "${CMAKE_${lang}_FLAGS} -fmax-errors=1")
endif()
endforeach()