[CMake] Using Clang + Ninja on Windows?
Brad King
brad.king at kitware.com
Wed Apr 20 11:54:50 EDT 2016
On 04/20/2016 10:01 AM, Johan Holmberg wrote:
> I tried specifying "-GNinja" to cmake, and setting CC/CXX to
> clang/clang++.
Good.
> But this didn't work. I get errors like:
>
> clang.exe: error: no such file or directory: '/nologo'
>
> indicating that CMake thinks it should pass Visual C++ style
> options to clang.
There are multiple variants of Clang that behave like "gcc" or "cl".
Which one is this? What installer did you use for Clang?
CMake should start out by printing the compiler id for the C and
CXX compilers. What did it show?
Please try a minimum test project like
>type CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(Test)
in a fresh build tree and post the files
CMakeFiles/CMake*.log
CMakeFiles/*/CMake*Compiler.cmake
to see what CMake detected about the compiler.
Thanks,
-Brad
More information about the CMake
mailing list