clang-cl

How to disable clang-cl specific warnings in VS project

非 Y 不嫁゛ 提交于 2020-07-09 16:10:01
问题 I use a 3rd party project, that produces huge amount of warnings. I disable all of them in VS project properties. Sometimes, I switch to LLVM clang-cl toolset to check for warnings from clang. The 3rd party project produces so many warnings with clang-cl that VS is chocking with the amount of output. I know how to disable them, I do so through command line args, for example: Wno-int-conversion -Wno-shift-op-parentheses etc. The problem, however, when I switch back to VS toolset, all of these

cmake detects clang-cl as clang

守給你的承諾、 提交于 2020-05-28 03:45:12
问题 I built boringssl with cmake and msvc Then I tried to build with clang-cl so I used -T"LLVM-vs2014" in vmake arguments Clang-cl uses cl arguments however cmake used gcc style arguments without adding -Xclang 回答1: The proper way to handle this case is checking for (${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang" AND "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")) 回答2: the problem was here : if(CMAKE_COMPILER_IS_GNUCXX OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS}

CMake building for Windows (clang-cl) using Ninja Generator

别来无恙 提交于 2020-01-03 17:22:45
问题 I am trying to build a simple application on a Windows machine using CMake as the main build tool. Once CMake is invoked on the project the is an error on configuration phase: > cmake -H. -G Ninja -Bbuild -DCMAKE_C_COMPILER:PATH="C:\Program Files\LLVM\bin\clang-cl.exe" -DCMAKE_CXX_COMPILER:PATH="C:\Program Files\LLVM\bin\clang-cl.exe" -- The C compiler identification is Clang 7.0.0 -- The CXX compiler identification is Clang 7.0.0 -- Check for working C compiler: C:/Program Files/LLVM/bin

CMake building for Windows (clang-cl) using Ninja Generator

陌路散爱 提交于 2020-01-03 17:22:05
问题 I am trying to build a simple application on a Windows machine using CMake as the main build tool. Once CMake is invoked on the project the is an error on configuration phase: > cmake -H. -G Ninja -Bbuild -DCMAKE_C_COMPILER:PATH="C:\Program Files\LLVM\bin\clang-cl.exe" -DCMAKE_CXX_COMPILER:PATH="C:\Program Files\LLVM\bin\clang-cl.exe" -- The C compiler identification is Clang 7.0.0 -- The CXX compiler identification is Clang 7.0.0 -- Check for working C compiler: C:/Program Files/LLVM/bin

How to circumvent Windows Universal CRT headers dependency on vcruntime.h

家住魔仙堡 提交于 2019-11-26 21:38:34
问题 In trying to evaluate Clang on Windows, utilizing the Windows Universal C Run-Time (...\Windows Kits\10\Include\10.0.15063.0\ucrt) I was immediately facing unexpected wall, in the form of an undisclosed and unexpected dependency on Microsoft's Visual Studio. Apparently even the simplest C program will not be able to compile as soon as you include any standard C header, because they all seem to end-up attempting to #include vcruntime.h (which is not part of the UCRT). My questions are: Is