Skip to content

Commit 6e32ac3

Browse files
committed
update docs/build/WINDOWS.md
1 parent e20d034 commit 6e32ac3

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ endif()
3434
if(NBL_STATIC_BUILD)
3535
message(STATUS "Static Nabla build enabled!")
3636
else()
37-
if(WIN32 AND MSVC)
37+
if(MSVC)
3838
if(NBL_DYNAMIC_MSVC_RUNTIME)
3939
message(STATUS "Shared Nabla build enabled!")
4040
else()

docs/build/WINDOWS.md

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,18 +46,23 @@ You also have options `BUILD_EXAMPLES` and `BUILD_TOOLS` which do exactly what t
4646

4747
For Windows *MSVC* required, *MinGW* build system maintenance will be delegated to the community.
4848

49-
### Ninja Multi-Config generator
49+
### Ninja Multi-Config generator & MSVC
5050

51-
The target toolset is MSVC. Before invoking CMake you need to [initialize VS's environment](https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170#sourcing-the-environment-when-building-with-command-line-generators-on-windows) by calling
51+
#### Command line
52+
53+
Open command line, init MSVC [toolset environment](https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170#sourcing-the-environment-when-building-with-command-line-generators-on-windows) by calling
5254

5355
```cmd
5456
vcvarsall.bat <platform>
5557
```
5658

57-
in your cmd (eg. `vcvarsall.bat x64` call will initialize environment for amd64, for more info go [here](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#vcvarsall-syntax)). Once initialization is done you can use Ninja CMake preset to build Nabla, eg.
59+
(eg. `vcvarsall.bat x64` call will initialize environment for amd64, for more info see [following](https://learn.microsoft.com/en-us/cpp/build/building-on-the-command-line?view=msvc-170#vcvarsall-syntax)). Once initialized fire a ninja preset.
5860

5961
```cmd
62+
cmake --preset user-configure-dynamic-ninja-multi
6063
cmake --build --preset user-build-dynamic-ninja-multi --config Debug -- --quiet
6164
```
6265

63-
The build preset will pick configure preset associated with it and invoke configure then build. Pay attention that if you don't initialize VS's environment the following will fail to compile with MSVC toolset.
66+
#### With Visual Studio
67+
68+
Follow VS [tutorial](https://learn.microsoft.com/en-us/cpp/build/cmake-projects-in-visual-studio?view=msvc-170).

0 commit comments

Comments
 (0)