Skip to content

Commit

Permalink
Drop support for Visual Studio <2019.
Browse files Browse the repository at this point in the history
Fix #289.
  • Loading branch information
tom-seddon committed Oct 11, 2023
1 parent 6cedef7 commit 4bd1939
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 40 deletions.
29 changes: 4 additions & 25 deletions Makefile.windows.mak
Original file line number Diff line number Diff line change
Expand Up @@ -3,42 +3,21 @@
##########################################################################
##########################################################################

.PHONY:init_vs2015
init_vs2015:
$(MAKE) _older_vs VSYEAR=2015 VSVER=14

##########################################################################
##########################################################################

.PHONY:init_vs2017
init_vs2017:
$(MAKE) _older_vs VSYEAR=2017 VSVER=15

##########################################################################
##########################################################################

.PHONY:init_vs2019
init_vs2019:
$(MAKE) _newer_vs VSYEAR=2019 VSVER=16

##########################################################################
##########################################################################

.PHONY:_older_vs
_older_vs: FOLDER=$(BUILD_FOLDER)/$(FOLDER_PREFIX)vs$(VSYEAR)
_older_vs:
cmd /c bin\recreate_folder.bat $(FOLDER)
cd "$(FOLDER)" && cmake $(CMAKE_DEFINES) -G "$(strip Visual Studio $(VSVER) Win64)" ../..
$(SHELLCMD) copy-file etc\b2.ChildProcessDbgSettings "$(FOLDER)"

##########################################################################
##########################################################################

.PHONY:_newer_vs
_newer_vs: VS_PATH:=$(shell "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -version $(VSVER) -property installationPath)
_newer_vs: CMAKE:=$(VS_PATH)\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake.exe
_newer_vs: FOLDER=$(BUILD_FOLDER)/$(FOLDER_PREFIX)vs$(VSYEAR)
_newer_vs:
$(if $(VS_PATH),,$(error Visual Studio $(VSYEAR) installation not found))
cmd /c bin\recreate_folder.bat $(FOLDER)
cd "$(FOLDER)" && cmake $(CMAKE_DEFINES) -G "$(strip Visual Studio $(VSVER))" -A x64 ../..
cd "$(FOLDER)" && "$(CMAKE)" $(CMAKE_DEFINES) -G "$(strip Visual Studio $(VSVER))" -A x64 ../..
$(SHELLCMD) copy-file etc\b2.ChildProcessDbgSettings "$(FOLDER)"

##########################################################################
Expand Down
17 changes: 2 additions & 15 deletions doc/Building-on-Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@

Prerequisites:

- Visual Studio 2019
- [cmake](https://cmake.org/) version 3.20+ on the PATH
- Visual Studio 2019 (ensure C++ CMake tools for Windows is included)

Optional, but recommended:

Expand All @@ -16,25 +15,13 @@ Initial build steps:
2. Run `bin\snmake init_vs2019` to generate a solution for Visual
Studio 2019.

You can also generate solutions for other Visual Studio versions,
as follows. These are supposed to work, but I only test them
occasionally, and I'll remove them if they become too difficult to
support.

- Visual Studio 2017: `bin\snmake init_vs2017`
- Visual Studio 2015: `bin\snmake init_vs2015`

You should get a bunch of output - there may be the odd warning,
but there should be no obvious errors, and it should finish with an
exit code of 0

General day-to-day build steps:

1. Load appropriate solution into Visual Studio:

- VS2019: `build\vs2019\b2.sln`
- VS2017: `build\vs2017\b2.sln`
- VS2015: `build\vs2015\b2.sln`
1. Load solution into Visual Studio: `build\vs2019\b2.sln`

2. Build

Expand Down

0 comments on commit 4bd1939

Please sign in to comment.