Skip to content

Commit a62a6ba

Browse files
NicolasHugfacebook-github-bot
authored andcommitted
[fbsync] CMake build using VS2022 (#7694)
Summary: Co-authored-by: Andrey Talman <[email protected]> Reviewed By: vmoens Differential Revision: D47186588 fbshipit-source-id: 988acd6df7f2bf4f8c9ef41ec6bd9e42b94a545a
1 parent bb28e03 commit a62a6ba

File tree

5 files changed

+15
-11
lines changed

5 files changed

+15
-11
lines changed

.github/scripts/setup-env.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ echo '::endgroup::'
5454

5555
if [[ "${OS_TYPE}" == windows && "${GPU_ARCH_TYPE}" == cuda ]]; then
5656
echo '::group::Install VisualStudio CUDA extensions on Windows'
57-
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
57+
if [[ "${VC_YEAR:-}" == "2022" ]]; then
58+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2022/BuildTools/MSBuild/Microsoft/VC/v170/BuildCustomizations"
59+
else
60+
TARGET_DIR="/c/Program Files (x86)/Microsoft Visual Studio/2019/BuildTools/MSBuild/Microsoft/VC/v160/BuildCustomizations"
61+
fi
5862
mkdir -p "${TARGET_DIR}"
5963
cp -r "${CUDA_HOME}/MSBuildExtensions/"* "${TARGET_DIR}"
6064
echo '::endgroup::'

.github/workflows/build-cmake.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,9 +74,9 @@ jobs:
7474
script: |
7575
set -euo pipefail
7676
77-
source packaging/windows/internal/vc_install_helper.sh
78-
7977
export PYTHON_VERSION=3.8
78+
export VC_YEAR=2022
79+
export VSDEVCMD_ARGS=""
8080
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
8181
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
8282

.github/workflows/tests.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,8 @@ jobs:
9898
set -euxo pipefail
9999
100100
export PYTHON_VERSION=${{ matrix.python-version }}
101+
export VC_YEAR=2019
102+
export VSDEVCMD_ARGS=""
101103
export GPU_ARCH_TYPE=${{ matrix.gpu-arch-type }}
102104
export GPU_ARCH_VERSION=${{ matrix.gpu-arch-version }}
103105

packaging/windows/internal/vc_env_helper.bat

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
@echo on
22

3-
set VC_VERSION_LOWER=16
4-
set VC_VERSION_UPPER=17
3+
set VC_VERSION_LOWER=17
4+
set VC_VERSION_UPPER=18
5+
if "%VC_YEAR%" == "2019" (
6+
set VC_VERSION_LOWER=16
7+
set VC_VERSION_UPPER=17
8+
)
59
if "%VC_YEAR%" == "2017" (
610
set VC_VERSION_LOWER=15
711
set VC_VERSION_UPPER=16

packaging/windows/internal/vc_install_helper.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)