Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
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-cpplib
Commits
fc8b5caf
Commit
fc8b5caf
authored
5 months ago
by
Joscha Schmiedt
Browse files
Options
Downloads
Patches
Plain Diff
Add conan-create to ps1 Makfile
parent
2c04accd
No related branches found
No related tags found
2 merge requests
!61
Release 0.3.0
,
!58
Fix conan create on Windows
Pipeline
#56340
failed
5 months ago
Stage: info
Stage: setup
Stage: test
Stage: deploy
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
make.ps1
+19
-6
19 additions, 6 deletions
make.ps1
with
19 additions
and
6 deletions
make.ps1
+
19
−
6
View file @
fc8b5caf
...
...
@@ -2,6 +2,9 @@ param (
[
string
]
$target
)
$buildType
=
"Release"
$cppStd
=
17
function
Install-Conan
{
Write-Output
"Installing Release dependencies with Conan..."
# check if conan is available
...
...
@@ -9,11 +12,11 @@ function Install-Conan {
Write-Output
"Conan is not available. Please install Conan or activate the Conan environment venv"
exit
1
}
conan
install
.
--build
=
missing
-s
build_type
=
Releas
e
-s
compiler.cppstd
=
17
conan
install
.
--build
=
missing
-s
build_type
=
$buildTyp
e
-s
compiler.cppstd
=
$cppStd
cmake
--preset
conan-default
}
function
Build-Project
{
function
Invoke-Build
{
Write-Output
"Building the project..."
# check if msbuild is available
if
(
-not
(
Get-Command
msbuild
-ErrorAction
SilentlyContinue
))
{
...
...
@@ -25,7 +28,7 @@ function Build-Project {
Write-Output
"Please run conan-install first."
exit
1
}
msbuild
.
\build\liblinkahead.sln
/property:Configuration
=
Releas
e
msbuild
.
\build\liblinkahead.sln
/property:Configuration
=
$buildTyp
e
}
function
Invoke-Tests
{
...
...
@@ -37,6 +40,12 @@ function Invoke-Tests {
}
Set-Location
.
\build\
ctest
Set-Location
..
\
}
function
Invoke-Create
{
Write-Output
"Creating Conan package..."
conan
create
.
}
# check if vswhere is available
...
...
@@ -57,7 +66,7 @@ Set-Location $currentPath
switch
(
$target
)
{
"build"
{
Build-Project
Invoke-Build
}
"test"
{
Invoke-Tests
...
...
@@ -65,16 +74,20 @@ switch ($target) {
"conan-install"
{
Install-Conan
}
"conan-create"
{
Invoke-Create
}
"clean"
{
Write-Output
"Cleaning the project..."
Remove-Item
-Recurse
-Force
.
\build\
*
}
"all"
{
Install-Conan
Build-Project
Invoke-Build
Invoke-Tests
Invoke-Create
}
default
{
Write-Output
"Usage: .\make.ps1 [all|conan-install|build|test|clean]"
Write-Output
"Usage: .\make.ps1 [all|conan-install|
conan-create|
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