From 3fe58f0c9b46060970df4fe031ff961303661440 Mon Sep 17 00:00:00 2001 From: Lars Bilke <lars.bilke@ufz.de> Date: Wed, 29 Jan 2020 20:24:42 +0100 Subject: [PATCH] [web] Added msvc version info and check. --- scripts/cmake/CompilerSetup.cmake | 6 ++++++ .../docs/devguide/getting-started/prerequisites.pandoc | 4 ++-- web/data/versions.json | 7 ++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index c5af43ae39b..32b4c305504 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -118,6 +118,12 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL) endif() if(MSVC) + if(${MSVC_TOOLSET_VERSION} LESS ${ogs.minimum_version.msvc.toolset}) + message(FATAL_ERROR "Aborting: Visual Studio ${ogs.minimum_version.msvc.year} \ + is required! Found Visual Studio with toolset version \ + ${MSVC_TOOLSET_VERSION}. See the following link for version info: \ + https://cmake.org/cmake/help/v3.16/variable/MSVC_TOOLSET_VERSION.html") + endif() if(OGS_CPU_ARCHITECTURE STREQUAL "native") set(CPU_FLAGS /favor:blend) else() diff --git a/web/content/docs/devguide/getting-started/prerequisites.pandoc b/web/content/docs/devguide/getting-started/prerequisites.pandoc index 32617bee6f9..24485fcfd8f 100644 --- a/web/content/docs/devguide/getting-started/prerequisites.pandoc +++ b/web/content/docs/devguide/getting-started/prerequisites.pandoc @@ -22,9 +22,9 @@ The minimum prerequisites to build OGS are: ## Step: Install a compiler ::: {.win} -As we use lots of features of the C++17-standard we support **Visual Studio 2015** and up. Therefore you will need at least **Windows 7** (64-bit recommended). It is perfectly fine to use the free Community Edition of Visual Studio. +As we use lots of features of the C++17-standard we support **Visual Studio {{< dataFile "versions.minimum_version.msvc.year" >}}** and up. Therefore you will need at least **Windows 7** (64-bit recommended). It is perfectly fine to use the free Community Edition of Visual Studio. -- Download and install [Visual Studio Community 2017](https://www.visualstudio.com/de/thank-you-downloading-visual-studio/?sku=Community&rel=15) +- Download and install [Visual Studio Community](https://www.visualstudio.com) - Select the *workload* `Desktop Development with C++` - You can uncheck everything else - When installation finished please start Visual Studio once (when asked for credentials enter your Microsoft account or click on **Skip for now**) diff --git a/web/data/versions.json b/web/data/versions.json index 2f6053556ab..4261ce2d19e 100644 --- a/web/data/versions.json +++ b/web/data/versions.json @@ -1,6 +1,11 @@ { "minimum_version": { "gcc": "7.3", - "clang": "3.5" + "clang": "3.5", + "msvc": { + "year": "2017", + "number": "15", + "toolset": "141" + } } } -- GitLab