[CMake] Is there any way to use clang-cl with MSBuild on Windows?
Yi-Hong Lyu
b95705030 at ntu.edu.tw
Wed Feb 3 14:46:20 EST 2016
Hello Gilles,
Here it is:
PS > cmake -G "Visual Studio 14 2015" -T v140_clang_3_7
-DLLVM_PATH="E:\\llvm" -DCMAKE_SYSTEM_VERSION=8.1
-DCMAKE_C_COMPILER="E:\\e2tools\\ext-tools\\llvm\\clang-cl.exe"
-DCMAKE_CXX_COMPILER="E:\\e2tools\\ext-tools\\llvm\\clang-cl.exe" ..\src\
-- The CXX compiler identification is unknown
-- The C compiler identification is unknown
-- Check for working CXX compiler using: Visual Studio 14 2015
-- Check for working CXX compiler using: Visual Studio 14 2015 -- broken
CMake Error at E:/CMake/clang_3_7/Modules/CMakeTestCXXCompiler.cmake:54
(message):
The C++ compiler "E:\e2tools\ext-tools\llvm\clang-cl.exe" is not able to
compile a simple test program.
It fails with the following output:
Change Dir: E:/libcxx/b-libcxx-Cascade-msbuild2/CMakeFiles/CMakeTmp
Run Build Command:"C:/Program Files (x86)/MSBuild/14.0/bin/MSBuild.exe"
"cmTC_00a23.vcxproj" "/p:Configuration=Debug"
"/p:VisualStudioVersion=14.0"
Microsoft (R) Build Engine version 14.0.24720.0
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5):
error MSB8020: The build tools for v140_clang_3_7 (Platform Toolset =
'v140_clang_3_7') cannot be found. To build using the v140_clang_3_7
build
tools, please install v140_clang_3_7 build tools. Alternatively, you may
upgrade to the current Visual Studio tools by selecting the Project menu
or
right-click the solution, and then selecting "Retarget solution".
[E:\libcxx\b-libcxx-Cascade-msbuild2\CMakeFiles\CMakeTmp\cmTC_00a23.vcxproj]
C:\Program Files
(x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.Cpp.Platform.targets(57,5):
error MSB8020: The build tools for v140_clang_3_7 (Platform Toolset =
'v140_clang_3_7') cannot be found. To build using the v140_clang_3_7 build
tools, please install v140_clang_3_7 build tools. Alternatively, you may
upgrade to the current Visual Studio tools by selecting the Project menu or
right-click the solution, and then selecting "Retarget solution".
[E:\libcxx\b-libcxx-Cascade-msbuild2\CMakeFiles\CMakeTmp\cmTC_00a23.vcxproj]
0 warning
1 error
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:17 (project)
-- Configuring incomplete, errors occurred!
PS. Part of the messages in Chinese are removed, please tell me if you need
it as well
Thanks for your help,
Yi-Hong
2016-02-04 3:25 GMT+08:00 Gilles Khouzam <Gilles.Khouzam at microsoft.com>:
> Hi Yi-Hong,
>
>
>
> Can you try to add the following: -DCMAKE_SYSTEM_VERSION=8.1 to your
> parameters?
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20160204/2e36c142/attachment.html>
More information about the CMake
mailing list