Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_backend_cpu
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Charles Villard
aidge_backend_cpu
Commits
c995551a
Commit
c995551a
authored
1 year ago
by
Olivier BICHLER
Browse files
Options
Downloads
Patches
Plain Diff
Added error check and script uniformization
parent
23230cdc
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
setup.ps1
+19
-4
19 additions, 4 deletions
setup.ps1
with
19 additions
and
4 deletions
setup.ps1
+
19
−
4
View file @
c995551a
...
...
@@ -4,20 +4,35 @@
################################################################################
# aidge_core must be installed first in $env:AIDGE_INSTALL_PATH.
# Enable or disable automatic installation of requirements
# Run .\setup.ps1 -install_reqs:$false to disable it
param
([
bool
]
$install_reqs
=
$true
)
if
(
-not
$
env
:
AIDGE_INSTALL_PATH
)
{
Write-Error
-Message
"AIDGE_INSTALL_PATH environment variable must be set to aidge_core install path."
-ErrorAction
Stop
}
#
Compile & install aidge_core
#
1. Setup environment
################################################################################
if
(
$install_reqs
)
{
# No additional dependencies
}
# 2. Compile & install aidge_core
################################################################################
$
env
:
CMAKE_PREFIX_PATH
=
$
env
:
AIDGE_INSTALL_PATH
m
d
-Force
build_cpp
m
d
-Force
$
env
:
AIDGE_INSTALL_PATH
cd
build_cpp
m
kdir
-Force
build_cpp
m
kdir
-Force
$
env
:
AIDGE_INSTALL_PATH
Set-Location
build_cpp
cmake
-DCMAKE_INSTALL_PREFIX
:
PATH
=
$
env
:
AIDGE_INSTALL_PATH
-DCMAKE_BUILD_TYPE
=
Debug
..
if
(
!
$?
)
{
Set-Location
$PSScriptRoot
;
Exit
$LASTEXITCODE
}
cmake
--build
.
-j2
if
(
!
$?
)
{
Set-Location
$PSScriptRoot
;
Exit
$LASTEXITCODE
}
cmake
--install
.
--config
Debug
if
(
!
$?
)
{
Set-Location
$PSScriptRoot
;
Exit
$LASTEXITCODE
}
# Optional: run the unit tests
ctest
--output-on-failure
if
(
!
$?
)
{
Set-Location
$PSScriptRoot
;
Exit
$LASTEXITCODE
}
Set-Location
$PSScriptRoot
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