Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cppinttest
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cppinttest
Commits
1bc1e914
Commit
1bc1e914
authored
4 months ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Add Windows "Makefile"
parent
1c699b6c
No related branches found
Branches containing commit
No related tags found
2 merge requests
!41
Release 0.3.0
,
!38
Make integration tests runnable on Windows
Pipeline
#56369
passed
4 months ago
Stage: info
Stage: setup
Stage: build
Stage: test
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
make.ps1
+89
-0
89 additions, 0 deletions
make.ps1
with
89 additions
and
0 deletions
make.ps1
0 → 100644
+
89
−
0
View file @
1bc1e914
param
(
[
string
]
$target
)
$buildType
=
"Release"
$cppStd
=
17
function
Install-Conan
{
Write-Output
"Installing Release dependencies with Conan..."
# check if conan is available
if
(
-not
(
Get-Command
conan
-ErrorAction
SilentlyContinue
))
{
Write-Output
"Conan is not available. Please install Conan or activate the Conan environment venv"
exit
1
}
conan
install
.
--build
=
missing
-s
build_type
=
$buildType
-s
compiler.cppstd
=
$cppStd
cmake
--preset
conan-default
}
function
Invoke-Build
{
Write-Output
"Building the project..."
# check if msbuild is available
if
(
-not
(
Get-Command
msbuild
-ErrorAction
SilentlyContinue
))
{
Write-Output
"msbuild is not available. Please install Visual Studio or open the Developer PowerShell."
exit
1
}
# check if conan install was run
if
(
-not
(
Test-Path
.
\build\liblinkahead_inttests.sln
))
{
Write-Output
"Please run conan-install first."
exit
1
}
msbuild
.
\build\liblinkahead_inttests.sln
/property:Configuration
=
$buildType
}
function
Invoke-Tests
{
Write-Output
"Running tests..."
Set-Location
.
\build\
ctest
Set-Location
..
\
}
function
Invoke-Create
{
Write-Output
"Creating Conan package..."
conan
create
.
}
# check if vswhere is available
if
(
-not
(
Test-Path
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
))
{
Write-Output
"vswhere is not available. Please install Visual Studio"
exit
1
}
# locate the latest Visual Studio installation
$currentPath
=
Get-Location
$installPath
=
&
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe"
-latest
-products
*
-requires
Microsoft.Component.MSBuild
-property
installationPath
Import-Module
(
Join-Path
$installPath
"Common7\Tools\Microsoft.VisualStudio.DevShell.dll"
)
Enter-VsDevShell
-VsInstallPath
$installPath
Set-Location
$currentPath
# Windows is with Release only for now
switch
(
$target
)
{
"build"
{
Invoke-Build
}
"test"
{
Invoke-Tests
}
"conan-install"
{
Install-Conan
}
"conan-create"
{
Invoke-Create
}
"clean"
{
Write-Output
"Cleaning the project..."
Remove-Item
-Recurse
-Force
.
\build\
*
}
"all"
{
Install-Conan
Invoke-Build
Invoke-Tests
Invoke-Create
}
default
{
Write-Output
"Usage: .\make.ps1 [all|conan-install|build|test|clean]"
}
}
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