diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-08-23 16:32:56 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2019-08-24 02:32:56 +0300 |
commit | 110b56293059999231d5b32cbf552c7845375cb0 (patch) | |
tree | 79888f75fdca96ff2f66ffa13cbc230bba25a74e /docs/markdown/Using-with-Visual-Studio.md | |
parent | e085aa089f50a2429ce90a6d24e23bc86faeeeec (diff) | |
download | meson-110b56293059999231d5b32cbf552c7845375cb0.zip meson-110b56293059999231d5b32cbf552c7845375cb0.tar.gz meson-110b56293059999231d5b32cbf552c7845375cb0.tar.bz2 |
Vs backend compiler selection (#5448)
* backends/vs: Only set platform_toolset if it isn't already set
* interpreter: set backend up after the compiler
Otherwise we won't be able to check which VS toolchain to use.
* docs/using-visual-studio: wrap lines
* docs: recommend the py launcher instead of python3 for windows
* set backend.environment when building a dummy version
* backends/vs: Add support for clang-cl with vs2017 and vs2019 backends
* backends/vs: Add support for ICL (19.x) with vs2015 and vs2017 backends
Diffstat (limited to 'docs/markdown/Using-with-Visual-Studio.md')
-rw-r--r-- | docs/markdown/Using-with-Visual-Studio.md | 36 |
1 files changed, 32 insertions, 4 deletions
diff --git a/docs/markdown/Using-with-Visual-Studio.md b/docs/markdown/Using-with-Visual-Studio.md index 339fda3..38325a3 100644 --- a/docs/markdown/Using-with-Visual-Studio.md +++ b/docs/markdown/Using-with-Visual-Studio.md @@ -4,13 +4,41 @@ short-description: How to use meson in Visual Studio # Using with Visual Studio -In order to generate Visual Studio projects, Meson needs to know the settings of your installed version of Visual Studio. The only way to get this information is to run Meson under the Visual Studio Command Prompt. The steps to set it up are as follows: +In order to generate Visual Studio projects, Meson needs to know the settings +of your installed version of Visual Studio. The only way to get this +information is to run Meson under the Visual Studio Command Prompt. The steps +to set it up are as follows: 1. Click on start menu and select "Visual Studio 2015 Command Prompt" 1. cd into your source directory 1. mkdir builddir -1. python3 path/to/meson.py builddir --backend vs2015 +1. py -3 path/to/meson.py builddir --backend vs2015 -If you wish to use the Ninja backend instead of vs2015, pass `--backend ninja`. At the time of writing the Ninja backend is more mature than the VS backend so you might want to use it for serious work. +If you wish to use the Ninja backend instead of vs2015, pass `--backend +ninja`. At the time of writing the Ninja backend is more mature than the VS +backend so you might want to use it for serious work. -This assumes Python3 is in your `PATH`, which is highly recommended. +This assumes the py launcher is in your `PATH`, which is highly recommended. + +# Using Clang-CL with Visual Studio + +*(new in 0.52.0)* + +You will first need to get a copy of llvm+clang for Windows, such versions +are available from a number of sources, including the llvm website. Then you +will need the [llvm toolset extension for visual +studio](https://marketplace.visualstudio.com/items?itemName=LLVMExtensions.llvm-toolchain). +You then need to either use a [native file](Native-environments.md#binaries) +or `set CC=clang-cl`, and `set CXX=clang-cl` to use those compilers, meson +will do the rest. + +This only works with visual studio 2017 and 2019. + +There is currently no support in meson for clang/c2. + +# Using Intel-CL (ICL) with Visual Studio + +*(new in 0.52.0)* + +To use ICL you need only have ICL installed and launch an ICL development +shell like you would for the ninja backend and meson will take care of it. |