Repository: conan-io/conan-center-index

Issue:
[package] boost/1.75.0: Builds under the "msvc" toolset instead of "clang-win" when "ClangCL" toolset is specified with Visual Studio
### Package and Environment Details
  * Package Name/Version: **boost/1.75.0**
  * Operating System+version: **Windows 10**
  * Compiler+version: **MSVC 2019 v16.8.6/Clang v11.0.1**
  * Conan version: **Conan version 1.33.1**
  * Python version: **Python 3.9.2**

### Conan profile
```
[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
compiler=Visual Studio
compiler.toolset=ClangCL
compiler.version=16
build_type=Release
[options]
[build_requires]
[env]
```


### Steps to reproduce
I've found that using clang directly as a compiler on windows is very hit and miss with regard to what packages will actually build successfully, and I've had much more success using Visual Studio with the toolset set to ClangCL as seen in the above profile. However when building boost with this profile, the recipe selects "msvc" as the toolset to use for building which results in ``cl.exe`` being invoked instead of ``clang-cl.exe``.

``conan install boost/1.75.0@ -r conan-center -pr vs-clang`` can be used with a common conan installation to reproduce the behavior, where profile ``vs-clang`` equals the aforementioned profile.

It's unlikely that building under the "msvc" toolset will ever be the intent of a user using the above profile and so I'd suggest the behavior be changed to select the "win-clang" toolset when conan specifies the compiler toolset as ClangCL in conjunction with the Visual Studio compiler.

The current behavior is caused by the branch on line 1054 of conanfile.py (seen below) being eagerly taken when Visual Studio is the compiler specified by conan.
```python
        if self._is_msvc: # <-- branch always followed when compiler given by conan is "Visual Studio"
            return "msvc"
        elif self.settings.os == "Windows" and self.settings.compiler == "clang": # <-- ideally this branch should be followed when compiler.toolset is "ClangCL"
            return "clang-win"
```
I've had success with building using the "clang-win" toolset on the above profile by changing the first branch to read the following, but it feels like a very dirty solution considering that the next branch still exists and serves a similar purpose.
```python
        if self._is_msvc:
            return "clang-win" if self.settings.compiler.toolset == "ClangCL" else "msvc"
```

</details>



Discussion:
yes, sounds logical, feel free to submit a PR with suggested fix.

Resolving patch:
diff --git a/recipes/boost/all/conanfile.py b/recipes/boost/all/conanfile.py
--- a/recipes/boost/all/conanfile.py
+++ b/recipes/boost/all/conanfile.py
@@ -1052,7 +1052,7 @@ def _toolset_version(self):
     @property
     def _toolset(self):
         if self._is_msvc:
-            return "msvc"
+            return "clang-win" if self.settings.compiler.toolset == "ClangCL" else "msvc"
         elif self.settings.os == "Windows" and self.settings.compiler == "clang":
             return "clang-win"
         elif self.settings.os == "Emscripten" and self.settings.compiler == "clang":


Test patch: