mirror of
https://github.com/jorenchik/testing-spring-2024.git
synced 2025-10-21 20:10:36 +00:00
docs(lv): add windows and mocos compilation instructions
This commit is contained in:
parent
dccdf82224
commit
48201b5946
28
README-lv.md
28
README-lv.md
@ -16,14 +16,31 @@ un mūsu pašu izstrādes testi. GTest tiek izmantots testiem.
|
|||||||
|
|
||||||
## Lietojums
|
## Lietojums
|
||||||
|
|
||||||
## Kompilācija
|
## Kompilācija uz Linux un MacOS
|
||||||
|
|
||||||
Kompilācijai operētājsistēmā Linux ir nepieciešams cmake un CXX kompilators (e.g., g++).
|
Kompilācijai operētājsistēmā Linux ir nepieciešams cmake un CXX kompilators (e.g., g++).
|
||||||
|
|
||||||
|
### MacOS
|
||||||
|
|
||||||
|
MacOS nepieciešama atsevišķi instalēt `gcc13`.
|
||||||
|
|
||||||
|
#### Izmantojot [Homebrew](https://brew.sh/)
|
||||||
|
|
||||||
|
```bash
|
||||||
|
brew install cmake gcc@13
|
||||||
|
brew install ninja # opcionāli
|
||||||
|
```
|
||||||
|
|
||||||
|
### Linux
|
||||||
|
|
||||||
|
Jūs zināt, ko darīt.
|
||||||
|
|
||||||
### ninja
|
### ninja
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -G Ninja -B build
|
cmake -G Ninja -B build
|
||||||
|
# vai
|
||||||
|
# cmake -G Ninja -B build -D CMAKE_CXX_COMPILER=g++-13 # MacOS
|
||||||
cd build
|
cd build
|
||||||
ninja
|
ninja
|
||||||
./main
|
./main
|
||||||
@ -33,10 +50,19 @@ ninja
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
cmake -B build
|
cmake -B build
|
||||||
|
# or
|
||||||
|
# cmake -B build -D CMAKE_CXX_COMPILER=g++-13 # for MacOS
|
||||||
cd build
|
cd build
|
||||||
make
|
make
|
||||||
./main
|
./main
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Windows un/vai VSCode
|
||||||
|
|
||||||
|
Uzstādiet [CMake](https://cmake.org/download/) un VSCode [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) paplašinājumu.
|
||||||
|
|
||||||
|
- Atveriet projektu kā saknes direktoriju VSCode.
|
||||||
|
- Izvēlaties **View->Command palete...** vai `Ctrl+Shift+P` un palaidiet `CMake: Build`.
|
||||||
|
|
||||||
Rezultātā iegūtie binārie faili ir `build/main` - programma un `build/runtests`, lai
|
Rezultātā iegūtie binārie faili ir `build/main` - programma un `build/runtests`, lai
|
||||||
palaistu punktos norādītos testus iekš `test.cpp`.
|
palaistu punktos norādītos testus iekš `test.cpp`.
|
||||||
|
|||||||
@ -26,6 +26,8 @@ Compilation on Linux and MacOS requires cmake and CXX compiler (e.g., g++).
|
|||||||
|
|
||||||
MacOS require a separate installation of `gcc13`.
|
MacOS require a separate installation of `gcc13`.
|
||||||
|
|
||||||
|
#### Using [Homebrew](https://brew.sh/)
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
brew install cmake gcc@13
|
brew install cmake gcc@13
|
||||||
brew install ninja # optional
|
brew install ninja # optional
|
||||||
@ -59,10 +61,9 @@ make
|
|||||||
|
|
||||||
### Windows and/or VSCode
|
### Windows and/or VSCode
|
||||||
|
|
||||||
Install [CMake](https://cmake.org/download/) and VSCode [CMake Tools extension](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools).
|
Install [CMake](https://cmake.org/download/) and VSCode [CMake Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.cmake-tools) extension.
|
||||||
|
|
||||||
- Open project as root in VSCode.
|
- Open project as root in VSCode.
|
||||||
- Open **View->Command palette...** or `Ctrl+Shift+P` and run `CMake: Build`.
|
- Press **View->Command palette...** or `Ctrl+Shift+P` and run `CMake: Build`.
|
||||||
|
|
||||||
Resulting binaries are `build/main` -- the program and `build/runtests` to
|
Resulting binaries are `build/main` -- the program and `build/runtests` to run tests specified in `test.cpp`.
|
||||||
run tests specified in `test.cpp`.
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user