Skip to content

Commit 907b823

Browse files
committed
Introduced CMake presets to the project.
Mainly to be able to build the project with VSCode directly, for a somewhat better developer experience. Switched the GitLab CI to use the "cuda" preset, instead of hard-coding configuration parameters itself.
1 parent be6e630 commit 907b823

File tree

4 files changed

+102
-8
lines changed

4 files changed

+102
-8
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# VSCode build output.
35+
out/

.gitlab-ci.yml

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# TRACCC library, part of the ACTS project (R&D line)
2+
#
3+
# (c) 2022-2023 CERN for the benefit of the ACTS project
4+
#
5+
# Mozilla Public License Version 2.0
6+
17
stages:
28
- build
39
- test
@@ -8,23 +14,19 @@ build_cuda:
814
stage: build
915
image: ghcr.io/acts-project/ubuntu2004_cuda:v30
1016
artifacts:
11-
paths:
17+
paths:
1218
- build
1319
script:
1420
- git clone $CLONE_URL src
1521
- git -C src checkout $HEAD_SHA
16-
- >
17-
cmake -S src -B build -GNinja
18-
-DCMAKE_BUILD_TYPE=Release
19-
-DTRACCC_BUILD_TESTING=ON
20-
-DTRACCC_BUILD_CUDA=ON
22+
- cmake --preset cuda -DCMAKE_BUILD_TYPE=Release -S src -B build -G Ninja
2123
- cmake --build build --parallel 2
2224

2325
test_cuda:
2426
stage: test
2527
tags: [docker-gpu-nvidia]
2628
image: ghcr.io/acts-project/ubuntu2004_cuda:v30
27-
needs:
29+
needs:
2830
- build_cuda
2931
script:
3032
- git clone $CLONE_URL src
@@ -35,4 +37,3 @@ test_cuda:
3537
- cd build
3638
- nvidia-smi
3739
- ctest --output-on-failure -E "^SeedingValidation/CompareWithActsSeedingTests.*"
38-

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"files.associations": {
3+
"*.hip": "cpp",
4+
"*.sycl": "cpp",
5+
"*.ipp": "cpp"
6+
}
7+
}

CMakePresets.json

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
{
2+
"version" : 3,
3+
"configurePresets": [
4+
{
5+
"name" : "base",
6+
"displayName" : "Base Configuration",
7+
"warnings": {
8+
"deprecated": true
9+
},
10+
"cacheVariables": {
11+
"CMAKE_BUILD_TYPE" : "RelWithDebInfo",
12+
"TRACCC_BUILD_TESTING" : "TRUE",
13+
"TRACCC_BUILD_EXAMPLES" : "TRUE",
14+
"TRACCC_FAIL_ON_WARNINGS" : "TRUE",
15+
"TRACCC_USE_ROOT" : "FALSE"
16+
}
17+
},
18+
{
19+
"name" : "cuda",
20+
"displayName" : "CUDA Code Development",
21+
"inherits": ["base"],
22+
"cacheVariables": {
23+
"TRACCC_BUILD_CUDA" : "TRUE",
24+
"VECMEM_BUILD_CUDA_LIBRARY" : "TRUE"
25+
}
26+
},
27+
{
28+
"name" : "sycl",
29+
"displayName" : "SYCL Code Development",
30+
"inherits": ["base"],
31+
"cacheVariables": {
32+
"TRACCC_BUILD_SYCL" : "TRUE",
33+
"VECMEM_BUILD_SYCL_LIBRARY" : "TRUE"
34+
}
35+
},
36+
{
37+
"name" : "alpaka",
38+
"displayName" : "Alpaka Code Development",
39+
"inherits": ["cuda"],
40+
"cacheVariables": {
41+
"TRACCC_BUILD_ALPAKA" : "TRUE"
42+
}
43+
},
44+
{
45+
"name" : "kokkos",
46+
"displayName" : "Kokkos Code Development",
47+
"inherits": ["cuda"],
48+
"cacheVariables": {
49+
"TRACCC_BUILD_KOKKOS" : "TRUE"
50+
}
51+
},
52+
{
53+
"name" : "root",
54+
"displayName" : "ROOT Enabled Code Development",
55+
"inherits": ["base"],
56+
"cacheVariables": {
57+
"TRACCC_USE_ROOT" : "TRUE",
58+
"TRACCC_USE_SYSTEM_TBB" : "TRUE"
59+
}
60+
},
61+
{
62+
"name" : "array",
63+
"displayName" : "ARRAY Backended Code Development",
64+
"inherits": ["base"],
65+
"cacheVariables": {
66+
"TRACCC_ALGEBRA_PLUGINS" : "ARRAY"
67+
}
68+
},
69+
{
70+
"name" : "eigen",
71+
"displayName" : "EIGEN Backended Code Development",
72+
"inherits": ["base"],
73+
"cacheVariables": {
74+
"TRACCC_ALGEBRA_PLUGINS" : "EIGEN"
75+
}
76+
},
77+
{
78+
"name" : "default",
79+
"displayName": "Default Build Configuration",
80+
"inherits": ["root", "array"]
81+
}
82+
]
83+
}

0 commit comments

Comments
 (0)