CMakeLists: Add support for LLVM on Windows
The LLVM project provides a clang-based MSVC compatible toolset for Microsoft Visual Studio. This suite is sometimes refered to as "clang-cl". This patch adds a few compiler flags to support this toolset.
This commit is contained in:
parent
cede5e442a
commit
52fdec5892
1 changed files with 7 additions and 0 deletions
|
@ -37,6 +37,13 @@ if (MSVC)
|
|||
/EHsc
|
||||
/WX)
|
||||
add_compile_options(/DNOMINMAX)
|
||||
|
||||
if (CMAKE_VS_PLATFORM_TOOLSET MATCHES "LLVM-vs[0-9]+")
|
||||
add_compile_options(-Qunused-arguments
|
||||
-Wno-unused-parameter
|
||||
-Wno-missing-braces)
|
||||
add_compile_options(-Xclang -fno-operator-names)
|
||||
endif()
|
||||
else()
|
||||
add_compile_options(-Wall
|
||||
-Werror
|
||||
|
|
Loading…
Reference in a new issue