@@ -37,15 +37,13 @@ Run `setup-cpp` with the available options.
37
37
``` shell
38
38
# Windows example (open PowerShell as admin)
39
39
npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
40
-
41
- RefreshEnv.cmd # activate the environment
40
+ # restart the shell to activate the environment
42
41
```
43
42
44
43
``` shell
45
44
# Linux/Macos example
46
45
sudo npx setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
47
-
48
- source ~ /.cpprc
46
+ source ~ /.cpprc # activate cpp environment variables
49
47
```
50
48
51
49
NOTE: In the ` compiler ` entry, you can specify the version after ` - ` like ` llvm-11.0.0 ` . For the tools, you can pass a specific version instead of ` true ` that chooses the default version
@@ -58,36 +56,41 @@ NOTE: setup-cpp requires Nodejs 12 or higher. If Nodejs shipped with your distri
58
56
59
57
#### With executable
60
58
61
- Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.40.0 ) , and run it with the available options. You can also automate downloading using ` wget ` , ` curl ` , or other similar tools.
62
-
63
- An example that installs llvm, cmake, ninja, ccache, and vcpkg:
59
+ Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.41.0 ) , and run it with the available options. You can also automate downloading using ` curl ` , or other similar tools.
64
60
65
61
``` shell
66
- # windows example (open PowerShell as admin)
67
- curl -LJO " https://github.com/aminya/setup-cpp/releases/download/v0.40.0/setup-cpp-x64-windows.exe"
68
- ./setup-cpp-x64-windows --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
62
+ # windows x64
63
+ curl -o ./setup-cpp.exe -LJ " https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-windows.exe"
69
64
70
- RefreshEnv.cmd # activate cpp environment variables
71
- ```
65
+ # linux x64
66
+ curl -o ./setup-cpp -LJ " https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-linux"
67
+ chmod +x ./setup-cpp
72
68
73
- ``` shell
74
- # linux example
75
- wget " https://github.com/aminya/setup-cpp/releases/download/v0.40.0/setup-cpp-x64-linux"
76
- chmod +x ./setup-cpp-x64-linux
77
- sudo ./setup-cpp-x64-linux --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
69
+ # macos arm64
70
+ curl -o ./setup-cpp -LJ " https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-arm64-macos"
71
+ chmod +x ./setup-cpp
78
72
79
- source ~ /.cpprc # activate cpp environment variables
73
+ # macos x64
74
+ curl -o ./setup-cpp -LJ " https://github.com/aminya/setup-cpp/releases/download/v0.41.0/setup-cpp-x64-macos"
75
+ chmod +x ./setup-cpp
80
76
```
81
77
78
+ An example that installs llvm, cmake, ninja, ccache, and vcpkg:
79
+
82
80
``` shell
83
- # macos example
84
- wget " https://github.com/aminya/ setup-cpp/releases/download/v0.40.0/setup-cpp-x64-macos "
85
- chmod +x ./setup-cpp-x64-macos
86
- sudo ./setup-cpp-x64-macos --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
81
+ # windows example (open PowerShell as admin)
82
+ ./ setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
83
+ # restart the shell to activate the environment
84
+ ```
87
85
86
+ ``` shell
87
+ # linux/macos example
88
+ sudo ./setup-cpp --compiler llvm --cmake true --ninja true --ccache true --vcpkg true
88
89
source ~ /.cpprc # activate cpp environment variables
89
90
```
90
91
92
+ NOTE: On Unix systems, if you are already a root user (e.g., in a GitLab runner or Docker), you will not need to use ` sudo ` .
93
+
91
94
### Inside GitHub Actions
92
95
93
96
Here is a complete cross-platform example that tests llvm, gcc, and msvc. It also uses cmake, ninja, vcpkg, and cppcheck.
@@ -156,19 +159,19 @@ To provide fast development environments, `setup-cpp` provides several prebuilt
156
159
You can use these images as a base image for your project.
157
160
158
161
``` dockerfile
159
- FROM aminya/setup-cpp-ubuntu-llvm:22.04-0.40 .0 AS builder
162
+ FROM aminya/setup-cpp-ubuntu-llvm:22.04-0.41 .0 AS builder
160
163
```
161
164
162
165
``` dockerfile
163
- FROM aminya/setup-cpp-ubuntu-mingw:22.04-0.40 .0 AS builder
166
+ FROM aminya/setup-cpp-ubuntu-mingw:22.04-0.41 .0 AS builder
164
167
```
165
168
166
169
``` dockerfile
167
- FROM aminya/setup-cpp-fedora-llvm:40-0.40 .0 AS builder
170
+ FROM aminya/setup-cpp-fedora-llvm:40-0.41 .0 AS builder
168
171
```
169
172
170
173
``` dockerfile
171
- FROM aminya/setup-cpp-arch-llvm:base-0.40 .0 AS builder
174
+ FROM aminya/setup-cpp-arch-llvm:base-0.41 .0 AS builder
172
175
```
173
176
174
177
The names are in the format ` aminya/setup-cpp-<platform>-<compiler>:<platform_version>-<setup_cpp_version> ` .
@@ -187,7 +190,7 @@ RUN apt-get update -qq && \
187
190
# install nodejs
188
191
apt-get install -y --no-install-recommends nodejs npm && \
189
192
# install setup-cpp
190
- npm install -g setup-cpp@v0.40 .0 && \
193
+ npm install -g setup-cpp@v0.41 .0 && \
191
194
# install the compiler and tools
192
195
setup-cpp \
193
196
--nala true \
@@ -296,7 +299,7 @@ stages:
296
299
apt-get install -y --no-install-recommends nodejs npm
297
300
298
301
# install setup-cpp
299
- npm install -g setup-cpp@v0.40 .0
302
+ npm install -g setup-cpp@v0.41 .0
300
303
301
304
# install the compiler and tools
302
305
./setup-cpp-x64-linux --compiler $compiler --cmake true --ninja true --ccache true --vcpkg true
0 commit comments