Clang with Visual Studio 2019 version 16.2 Preview 3
Hi,
I am trying to use the lastest CMake 15.0 rc4 to build an MSBuild project using clang
issue #19174 (closed) explain that we are required to have a custom Platform Toolset to correctly support msbuild.
the latest visual studio preview provides an LLVM (clang-cl) platform toolset.
this props include Microsoft.Cpp.ClangCl.Common.props
<!--
***********************************************************************************************
Microsoft.Cpp.ClangCl.Common.props
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<CLToolExe>clang-cl.exe</CLToolExe>
<LinkToolExe>lld-link.exe</LinkToolExe>
<LibToolExe>llvm-lib.exe</LibToolExe>
<ExecutablePath>$(LLVMInstallDir)\bin;$(ExecutablePath)</ExecutablePath>
</PropertyGroup>
</Project>
I am setting clang by doing -T ClangCl but I am getting an error
The C compiler identification is unknown
The CXX compiler identification is unknown
CMake Error at CMakeLists.txt:33 (project):
No CMAKE_C_COMPILER could be found.
CMake Error at CMakeLists.txt:33 (project):
No CMAKE_CXX_COMPILER could be found.
Is there a problem with Microsoft's clang props?
thank
Edited by michal wozniak