Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
BornAgain
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
BornAgain
Commits
48b12c2d
Commit
48b12c2d
authored
10 months ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
rm devtools/deploy/windows/setx64vcvars.ps1
parent
be4bd35d
No related branches found
No related tags found
1 merge request
!2516
CI Win rm redundancies
Pipeline
#139848
passed
10 months ago
Stage: build
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab-ci.yml
+7
-2
7 additions, 2 deletions
.gitlab-ci.yml
devtools/deploy/windows/setx64vcvars.ps1
+0
-48
0 additions, 48 deletions
devtools/deploy/windows/setx64vcvars.ps1
with
7 additions
and
50 deletions
.gitlab-ci.yml
+
7
−
2
View file @
48b12c2d
...
...
@@ -102,8 +102,6 @@ windows:
# paths:
# - build/
script
:
# add x64 MSVC variables to the environment
-
. ./devtools/deploy/windows/setx64vcvars.ps1
-
$OPT_DIR = "C:/opt/x64"
-
$BOOST_DIR = "$OPT_DIR/boost_current"
-
$QT_MSVC_DIR = "C:/Qt/6.2.4/msvc2019_64"
...
...
@@ -117,6 +115,13 @@ windows:
-
echo "# Path '<$Env:Path>'"
-
echo "# PythonPath '<$Env:PYTHONPATH>'"
-
echo "# Powershell <$PSHOME>`n PS Profile <$PROFILE>`n PS Command-Path <$PSCOMMANDPATH>"
# Visual Studio path <https://github.com/microsoft/vswhere/wiki/Find-VC>
-
$vsPath = &"${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationpath
-
echo "Microsoft Visual Studio path = '$vsPath'"
-
Import-Module (Get-ChildItem $vsPath -Recurse -File -Filter Microsoft.VisualStudio.DevShell.dll).FullName
-
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments '-arch=x64'
-
Set-Item -Path "env:CC" -Value "cl.exe"
-
Set-Item -Path "env:CXX" -Value "cl.exe"
# list all environmental variables
-
'
dir
Env:'
# make the CMake build directory
...
...
This diff is collapsed.
Click to expand it.
devtools/deploy/windows/setx64vcvars.ps1
deleted
100644 → 0
+
0
−
48
View file @
be4bd35d
# Set x64-Related MSVC Variables
# To source this script, first executing scripts must be allowed by changing the execution policy.
# Run PowerShell as an administrator and enter:
# `Set-ExecutionPolicy Bypass`
# See <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_execution_policies>
# Then, source this script, in _any_ PowerShell session via:
# `. <script-name> [MSVC|Clang]`
# See <https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scripts?#script-scope-and-dot-sourcing>
param
(
[
String
]
$Compiler
=
"MSVC"
)
if
(
$Compiler
-ne
"MSVC"
-and
$Compiler
-ne
"Clang"
)
{
Write-Error
"Unknown compiler '
$Compiler
'; must be MSVC or Clang"
Exit
-1
}
Write-Host
"======================================="
Write-Host
"Setting up environment variables..."
# Visual Studio path <https://github.com/microsoft/vswhere/wiki/Find-VC>
$vsPath
=
&
"
${env:ProgramFiles(x86)}
\Microsoft Visual Studio\Installer\vswhere.exe"
-latest
-products
*
-requires
Microsoft.VisualStudio.Component.VC.Tools.x86.x64
-property
installationpath
Write-Host
"Microsoft Visual Studio path = '
$vsPath
'"
# Use module `Microsoft.VisualStudio.DevShell.dll`
Import-Module
(
Get-ChildItem
$vsPath
-Recurse
-File
-Filter
Microsoft.VisualStudio.DevShell.dll
)
.
FullName
Enter-VsDevShell
-VsInstallPath
$vsPath
-SkipAutomaticLocation
-DevCmdArguments
'-arch=x64'
# NOTE: `-DevCmdArguments` are arguments to `vsdevcmd.bat`
# Select compiler
if
(
$Compiler
-eq
"MSVC"
)
{
$_
Compiler
=
"MSVC"
Set-Item
-Path
"env:CC"
-Value
"cl.exe"
Set-Item
-Path
"env:CXX"
-Value
"cl.exe"
}
elseif
(
$Compiler
-eq
"Clang"
)
{
$_
Compiler
=
"Clang"
Set-Item
-Path
"env:CC"
-Value
"clang-cl.exe"
Set-Item
-Path
"env:CXX"
-Value
"clang-cl.exe"
}
Write-Host
"Selecting
$_
Compiler as C/C++ compiler."
Write-Host
"======================================="
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment