forked from elastic/ml-cpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathset_env.ps1
31 lines (24 loc) · 1.35 KB
/
set_env.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#
# Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
# or more contributor license agreements. Licensed under the Elastic License
# 2.0 and the following additional limitation. Functionality enabled by the
# files subject to the Elastic License 2.0 may only be used in production when
# invoked by an Elasticsearch process with a license key installed that permits
# use of machine learning features. You may not use this file except in
# compliance with the Elastic License 2.0 and the foregoing additional
# limitation.
#
# Set up a build environment, to ensure repeatable builds
# Initialize the Visual Studio command prompt environment variables
& 'C:\Program Files\Microsoft Visual Studio\2022\Professional\Common7\Tools\Launch-VsDevShell.ps1' -Arch amd64 -HostArch amd64
# Set CPP_SRC_HOME to be an absolute path to this script's location, as
# different builds will come from different repositories and go to different
# staging areas
cd $PSScriptRoot
$env:CPP_SRC_HOME = git rev-parse --show-toplevel
# Assume the drive letter where our 3rd party dependencies are installed under
# \usr\local is the current drive at the time this script is run
$env:ROOT = (get-location).Drive.Name + ":"
$env:PATH="C:\Program Files\CMake\bin;$env:CPP_SRC_HOME\build\distribution\platform\windows-x86_64\bin;$env:PATH"
$env:INCLUDE=""
$env:LIBPATH=""