[CMake] Clang for Windows with CMake and Ninja (and Visual Studio)
Nagy-Egri Máté Ferenc
csiga.biga at aol.com
Tue Sep 12 10:37:36 EDT 2017
The link error is some error on my setup. The /nologo et al part still stands though. Can CMake invoke the Windows binary of Clang correctly?
Feladó: Nagy-Egri Máté Ferenc via CMake
Elküldve: 2017. szeptember 12., kedd 15:01
Címzett: Cmake Mailing List
Tárgy: [CMake] Clang for Windows with CMake and Ninja (and Visual Studio)
Hi!
I am trying to build using the Open Folder feature of VS (with CMake server mode integration) with the Windows binary release of Clang. However, when I try to build using clang++.exe, it argues about unknown compiler switches
clang++.exe: error: no such file or directory: '/nologo'
while if I use the clang-cl.exe front-end of Clang, it fails saying
LINK : fatal error LNK1104: cannot open file 'gdi32.lib'
Does this both inside VS and in a developer command prompt. My invocation is as follows:
cmake -G Ninja -DCMAKE_CXX_COMPILER=C:/Kellekek/LLVM/Clang/5.0/bin/clang++.exe C:\Users\Matty\Source\simplecpp\
My questions:
1. Why does CMake give MSVC params to Clang on Windows?
2. Is there a way to let the clang-cl front-end know how to link to system libraries?
Cheers,
Máté
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20170912/cb2473a9/attachment.html>
More information about the CMake
mailing list