[CMake] Problem using VS-compiled Clang as a C/C++ compiler.

Benjamin Eikel cmake at eikel.org
Fri Mar 4 07:36:37 EST 2016


Hi Anton,

Zitat von Anton Yartsev <anton.yartsev at gmail.com>:
>
> Here are the results from 'CXX=clang-cl.exe CC=clang-cl.exe cmake -G  
> "Ninja" ..' :
>
> $ set CXX=clang-cl
> $ set CC=clang-cl
> $ cmake -G "Ninja" ..
>
> -- No build type selected, default to Debug
> -- The C compiler identification is Clang 3.7.1
> -- The CXX compiler identification is Clang 3.7.1
> -- Check for working C compiler using: Ninja
> -- Check for working C compiler using: Ninja -- broken
> CMake Error at C:/Program  
> Files/CMake/share/cmake-3.5/Modules/CMakeTestCCompiler.cmake:61  
> (message):
>   The C compiler "D:/-Work-/llvm-3.7.1.src/-VS_build VS
>   2013-/Release/bin/clang-cl.exe" is not able to compile a simple test
>   program.

the path to your compiler seems to have spaces in it. I had problems  
on Windows with spaces or other special characters in the compiler  
path, too. Please try to locate the compiler in another path and see  
if it fixes your issue. If it does, maybe the CMake developers could  
check the path escaping on Windows.

Kind regards
Benjamin



More information about the CMake mailing list