diff options
author | Hossein <hossein@libreoffice.org> | 2022-04-24 12:04:33 +0200 |
---|---|---|
committer | Hossein <hossein@libreoffice.org> | 2022-05-05 17:26:12 +0200 |
commit | 7fe756570fb4ab30f540d644fd5125a67c2d9ea9 (patch) | |
tree | 1bf17c237b6faec90764448824a7cd4e447c76ad /configure.ac | |
parent | 759792e40aceb17a621c37ed725d1e998acbd30d (diff) |
Warn if Visual Studio 2019 version is < 16.10
During the compilation with Visual Studio 2019 v16.5, the dragonbox
was failing the build, but it was OK when ugprading to the latest
version, 16.11.
It should be noted that according to the list of predfined macros in
Visual Studio, v16.10 and v16.11 use the same value for _MSC_VER,
which is 1929. Thus, the distinction between these 2 versions can not
be distinguished.
Predefined macros
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros
For not having the Visual Studio version > 16.10, a warning is
shown, and if the Visual Studio version is < 16.5, just like before,
an error is generated.
Change-Id: I6661ee5121b03ca43e1f7503b74191abcc8d6b40
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132907
Tested-by: Jenkins
Reviewed-by: Hossein <hossein@libreoffice.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index ec9175d1964a..c711d230f0d2 100644 --- a/configure.ac +++ b/configure.ac @@ -4266,6 +4266,7 @@ if test "$_os" = "WINNT"; then AC_MSG_ERROR([Visual C++ not found after all, huh]) fi + # ERROR if VS version < 16.5 AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.5]) AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ // See <https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros> for mapping @@ -4275,6 +4276,21 @@ if test "$_os" = "WINNT"; then #endif ]])],[AC_MSG_RESULT([yes])],[AC_MSG_ERROR([no])]) + # WARN if VS version < 16.10 + AC_MSG_CHECKING([$CC_BASE is at least Visual Studio 2019 version 16.10]) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + #if _MSC_VER < 1929 + #error + #endif + ]])],[vs2019_recommended_version=yes],[vs2019_recommended_version=no]) + + if test $vs2019_recommended_version = yes; then + AC_MSG_RESULT([yes]) + else + AC_MSG_WARN([no]) + add_warning "You should have at least Visual Studio 2019 version 16.10 to avoid build problems. Otherwise, you may face problems with the build of some modules including dragonbox." + fi + # Check for 64-bit (cross-)compiler to use to build the 64-bit # version of the Explorer extension (and maybe other small # bits, too) needed when installing a 32-bit LibreOffice on a |