@@ -40,47 +40,50 @@ Tip: You can automate downloading using `wget`, `curl` or other similar tools.
4040
4141### Executable
4242
43- Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.1.1 ) , and run it with the available options.
43+ Download the executable for your platform from [ here] ( https://github.com/aminya/setup-cpp/releases/tag/v0.2 ) , and run it with the available options.
4444
45- An example that installs llvm, cmake, ninja, ccache, and conan.
45+ An example that installs llvm, cmake, ninja, ccache, and conan:
4646
4747``` ps1
4848# windows example (open shell as admin)
49- curl -O "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_windows.exe"
50- ./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
49+ curl -O "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_windows.exe"
50+ ./setup_cpp_windows --compiler llvm --cmake true --ninja true --ccache true --conan true
5151```
5252
5353``` ps1
5454# linux example
55- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_linux"
55+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_linux"
5656chmod +x setup_cpp_linux
57- sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
57+ sudo ./setup_cpp_linux --compiler llvm --cmake true --ninja true --ccache true --conan true
5858```
5959
6060``` ps1
6161# mac example
62- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_mac_linux"
62+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_mac_linux"
6363chmod +x setup_cpp_mac
64- sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
64+ sudo ./setup_cpp_mac --compiler llvm --cmake true --ninja true --ccache true --conan true
6565```
6666
67+ NOTE: In the ` compiler ` entry, you can specify the version after ` - ` like ` llvm-11 ` .
68+ For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
69+
6770### With Nodejs
6871
69- Download the ` setup_cpp.js ` file form [ here] ( https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp.js ) , and run it with the available options.
72+ Download the ` setup_cpp.js ` file form [ here] ( https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp.js ) , and run it with the available options.
7073
7174On Windows
7275
7376``` ps1
7477# open shell as admin
75- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp_windows.exe"
76- node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
78+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp_windows.exe"
79+ node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
7780```
7881
7982On Linux or Mac:
8083
8184``` ps1
82- wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1 /setup_cpp.js"
83- sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan "1.40.1"
85+ wget "https://github.com/aminya/setup-cpp/releases/download/v0.2 /setup_cpp.js"
86+ sudo node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
8487```
8588
8689# Inside GitHub Actions
@@ -111,6 +114,7 @@ jobs:
111114 compiler :
112115 - llvm
113116 - gcc
117+ # you can specify the version after `-` like `llvm-11`.
114118 steps :
115119 - name : Setup Cpp
116120 uses : aminya/setup-cpp@v1
@@ -120,40 +124,39 @@ jobs:
120124 ninja : true
121125 conan : true
122126 cppcheck : true
123- ccache : true
127+ ccache : true # instead of `true`, which chooses the default version, you can pass a specific version.
124128 # add any tool that you need here...
125129```
126130
127- In the ` compiler ` entry, you can specify the version after a ` - ` . For example, ` llvm-11 ` .
128-
129- For the tools, instead of ` true ` , which chooses the default version, you can pass a specific version.
130-
131131# Inside Docker
132132
133133Here is an example for using setup_cpp to make a builder image that has the cpp tools you need.
134134
135135``` dockerfile
136- # debian with node installed
137- FROM node:16
136+ # debian
137+ FROM debian:bullseye
138138
139- # add setup_cpp.js
139+ # add setup_cpp
140140WORKDIR "/"
141- RUN wget "https://github.com/aminya/setup-cpp/releases/download/v0.1.1/setup_cpp.js"
141+ RUN wget "https://github.com/aminya/setup-cpp/releases/download/v0.2/setup_cpp_linux"
142+ RUN chmod +x ./setup_cpp_linux
142143
143144# install llvm, cmake, ninja, ccache, and conan
144- RUN node ./setup_cpp.js --compiler llvm --cmake true --ninja true --ccache true --conan true
145+ RUN ./setup_cpp --compiler llvm --cmake true --ninja true --ccache true --conan true
145146
146147ENTRYPOINT [ "/bin/bash" ]
147148```
148149
149150See [ this folder] ( https://github.com/aminya/setup-cpp/tree/master/building/docker ) , for some dockerfile examples.
150151
151- If you want to build the ones included, then run (after ` -f ` use the docker file name) :
152+ If you want to build the ones included, then run:
152153
153154``` ps1
154- docker build -f ./building/docker/linux .dockerfile -t setup_cpp .
155+ docker build -f ./building/docker/debian .dockerfile -t setup_cpp .
155156```
156157
158+ After ` -f ` use the docker file name.
159+
157160### Incomplete
158161
159162- [ ] msvc. It is implemented, but has bugs. See [ this issue] ( https://github.com/aminya/cpp/issues/1 )
0 commit comments