Skip to content

Commit 6b28295

Browse files
authored
Merge pull request #319 from sbriseid/vs2022_compile_fix
Added support for VS 2022.
2 parents 5c7d572 + e109ad1 commit 6b28295

File tree

5 files changed

+22
-7
lines changed

5 files changed

+22
-7
lines changed

INSTALL

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,18 @@ you may try this option and see if it works. Requires Boost: www.boost.org.
5959
Windows
6060
*********
6161

62-
The code has been tested using Visual Studio 2015 and 2019, with x64.
62+
The code has been tested using Visual Studio 2015, 2019 and 2022, with x64.
6363

6464
Make sure that your installment of Visual Studio includes support for Visual C++. When installing Visual
6565
Studio you should select "Desktop development with C++" from the Workloads options. If you did not do
6666
that then you must launch the Visual Studio installer and select "Modify", then select "Desktop
6767
development with C++". Follow further instructions.
6868

69+
Note that Visual Studio introduced binary compatibility in Visual Studio 2015, allowing the user to mix
70+
binaries built by the VS toolsets v140, v141, v142 and v143 (Visual Studio 2015 and later, with some
71+
specific restrictions). The linker must use a toolset at least as recent as the newest toolset used by
72+
the binaries.
73+
6974
How to edit environment variables:
7075
- Open the settings application.
7176
- Search for env, select: "Edit the system environment variables" (or "Edit environment variables for
@@ -88,7 +93,7 @@ Qt:
8893
'C:\Qt\5.15.2\msvc2019_64'.
8994
- If you have more than one version of Visual Studio installed this variable may need to be changed
9095
accordingly if you switch to another version of Visual Studio. CMake must then be restarted and
91-
the cache deleted.
96+
the cache deleted. Note that binary compatibility may deem this step unnecessary.
9297
- You must also add the variable QT_QPA_PLATFORM_PLUGIN_PATH to the system environment
9398
variables. This variable refers to the platform plugins and is set to
9499
'${QTDIR}\plugins\platforms'. Starting from a clean build the build process must be run twice in

README

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ Newmat was written by Robert Davies, http://www.robertnz.com.
2020
Requirements:
2121
* CMake - see: www.cmake.org
2222
* Linux: Tested on the latest LTS version of Ubuntu (currently 20.04, using gcc version 9.3.0) on
23-
x64. It should work with gcc versions down to 4.8, but is not actively supported. It has been
23+
x64. It should work with gcc versions down to 4.8, but it is not actively supported. It has been
2424
tested to run on ARM64, but it is not actively supported.
25-
* Windows: Tested with Visual Studio 2015 and 2019 on x64. Older versions are not supported. It has
26-
been tested to run on ARM64, but it is not actively supported.
25+
* Windows: Tested with Visual Studio 2015, 2019 and 2022 on x64. Older versions are not
26+
supported. It has been tested to run on ARM64 (using x64 emulation), but it is not actively
27+
supported.
2728
* MacOS: We do not officially support MacOS. It has beed tested to run on ARM64, but it is not
2829
actively supported.
2930

compositemodel/cmake/Modules/FindPugiXML.cmake

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,10 @@ if(WIN32)
2929
elseif((${MSVC_VERSION} GREATER_EQUAL 1920) AND (${MSVC_VERSION} LESS 1930))
3030
# MESSAGE("Visual Studio 2019!")
3131
set(MSVC_NAME "msvc2019_")
32+
elseif((${MSVC_VERSION} EQUAL 1930))
33+
set(MSVC_NAME "msvc2022_")
34+
else()
35+
message("MSVC version not supported or not installed!")
3236
endif()
3337
if(CMAKE_CL_64)
3438
set(WIN_LIB_TYPE "64")

lrsplines2D/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ INCLUDE_DIRECTORIES(
1313
${GoLRspline2D_SOURCE_DIR}/include
1414
${GoToolsCore_SOURCE_DIR}/include
1515
${GoTools_COMMON_INCLUDE_DIRS}
16-
)
16+
${Boost_INCLUDE_DIRS}
17+
)
1718

1819

1920
# Linked in libraries

viewlib/cmake/Modules/FindJsonCpp.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ if(WIN32)
2121
elseif((${MSVC_VERSION} GREATER_EQUAL 1920) AND (${MSVC_VERSION} LESS 1930))
2222
# MESSAGE("Visual Studio 2019!")
2323
set(MSVC_NAME "msvc2019_")
24-
endif()
24+
elseif((${MSVC_VERSION} EQUAL 1930))
25+
set(MSVC_NAME "msvc2022_")
26+
else()
27+
message("MSVC version not supported or not installed!")
28+
endif()
2529
if(CMAKE_CL_64)
2630
set(WIN_LIB_TYPE "64")
2731
# message("The project is set to 64 bits!")

0 commit comments

Comments
 (0)