From dccdf82224fe526c1ab347deb588062f44177f90 Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Tue, 12 Mar 2024 13:20:28 +0200 Subject: [PATCH 1/2] docs(guide): add macos and windows compilation guide --- README.md | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 1580bda..f55835b 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,29 @@ and our own development tests. GTest is used for tests. ## Usage -## Compilation +## Compilation on Linux and MacOS -Compilation on Linux requires cmake and CXX compiler (e.g., g++). +Compilation on Linux and MacOS requires cmake and CXX compiler (e.g., g++). + +### MacOS + +MacOS require a separate installation of `gcc13`. + +```bash +brew install cmake gcc@13 +brew install ninja # optional +``` + +### Linux + +You know what to do. ### ninja ```bash -cmake -G Ninja -B build +cmake -G Ninja -B +# or +# cmake -G Ninja -B build -D CMAKE_CXX_COMPILER=g++-13 # MacOS cd build ninja ./main @@ -35,17 +50,19 @@ ninja ```bash cmake -B build +# or +# cmake -B build -D CMAKE_CXX_COMPILER=g++-13 # for MacOS cd build make ./main ``` -Resulting binaries are `build/main` - the program and `build/runtests` to +### 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). + +- Open project as root in VSCode. +- Open **View->Command palette...** or `Ctrl+Shift+P` and run `CMake: Build`. + +Resulting binaries are `build/main` -- the program and `build/runtests` to run tests specified in `test.cpp`. - -## TODOS - -- [x] Translate README in Latvian -- [ ] Windows support - - [x] Check the compilation process on Windows - - [ ] Add compilation guide From 48201b5946d5eaf6ff9219611c479319b8e81e7e Mon Sep 17 00:00:00 2001 From: Kristofers Solo Date: Tue, 12 Mar 2024 13:33:03 +0200 Subject: [PATCH 2/2] docs(lv): add windows and mocos compilation instructions --- README-lv.md | 28 +++++++++++++++++++++++++++- README.md | 9 +++++---- 2 files changed, 32 insertions(+), 5 deletions(-) diff --git a/README-lv.md b/README-lv.md index 2bd565f..fa62eb2 100644 --- a/README-lv.md +++ b/README-lv.md @@ -16,14 +16,31 @@ un mūsu pašu izstrādes testi. GTest tiek izmantots testiem. ## 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++). +### 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 ```bash cmake -G Ninja -B build +# vai +# cmake -G Ninja -B build -D CMAKE_CXX_COMPILER=g++-13 # MacOS cd build ninja ./main @@ -33,10 +50,19 @@ ninja ```bash cmake -B build +# or +# cmake -B build -D CMAKE_CXX_COMPILER=g++-13 # for MacOS cd build make ./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 palaistu punktos norādītos testus iekš `test.cpp`. diff --git a/README.md b/README.md index f55835b..da1f4c4 100644 --- a/README.md +++ b/README.md @@ -26,6 +26,8 @@ Compilation on Linux and MacOS requires cmake and CXX compiler (e.g., g++). MacOS require a separate installation of `gcc13`. +#### Using [Homebrew](https://brew.sh/) + ```bash brew install cmake gcc@13 brew install ninja # optional @@ -59,10 +61,9 @@ make ### 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 **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 -run tests specified in `test.cpp`. +Resulting binaries are `build/main` -- the program and `build/runtests` to run tests specified in `test.cpp`.