# How to specify GNU-like Clang for \`Visual Studio 16 2019\` generator?

**URL:** https://discourse.cmake.org/t/how-to-specify-gnu-like-clang-for-visual-studio-16-2019-generator/6639
**Category:** Code
**Tags:** os:windows, comp:clang, gen:vs
**Created:** [October 11, 2022, 7:00am UTC](https://discourse.cmake.org/t/how-to-specify-gnu-like-clang-for-visual-studio-16-2019-generator/6639 "2022-10-11T07:00:26Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![hwhsu1231](https://discourse.cmake.org/user_avatar/discourse.cmake.org/hwhsu1231/32/5358_2.png) [@hwhsu1231](https://discourse.cmake.org/u/hwhsu1231)
#### Post date: [October 11, 2022, 7:00am UTC](https://discourse.cmake.org/t/how-to-specify-gnu-like-clang-for-visual-studio-16-2019-generator/6639/1 "2022-10-11T07:00:26Z")

</div>

### Problem Descriptions

There are two types of Clang compilers after I install Clang/LLVM:

- **clang.exe/clang++.exe** : GNU-like Clang compiler
- **clang-cl.exe** : MSVC-like Clang compiler

 ![image](https://discourse.cmake.org/uploads/default/original/2X/4/485df4dd807d4eb25696845e5418947078c6969c.png)

According to this [issue](https://gitlab.kitware.com/cmake/cmake/-/issues/20415#note_707652), we can specify MSVC-like `clang-cl.exe` with the following arguments:

- `-T ClangCL` for Visual Studio 16 2019.
- `-T LLVM` for Visual Studio 15 2017.

I was wondering how to specify the GNU-like `clang.exe/clang++.exe` for Visual Studio 16 2019?

---

<div class="post-metadata">

### Author: ![ben.boeckel](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/b/ea5d25/32.png) [@ben.boeckel](https://discourse.cmake.org/u/ben.boeckel)
#### Post date: [October 11, 2022, 4:49pm UTC](https://discourse.cmake.org/t/how-to-specify-gnu-like-clang-for-visual-studio-16-2019-generator/6639/2 "2022-10-11T16:49:06Z")

</div>

I don’t think there’s a Visual Studio toolchain configuration for those toolchains. Well, there might be, but Visual Studio kind of assumes a `cl`-like command line interface IIRC. The closest thing you can do is use the `Ninja` generator and use Visual Studio’s CMake integration.
