Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated readme #1

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions basic_test.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "gtest/gtest.h"
#include <gtest/gtest.h>
#include <iostream>
#include <iomanip>

Expand All @@ -12,12 +12,6 @@

using namespace std;

//----------------------------------------------------------------------------------------
// COPY BASIC_TEST INTO THIS FILE.
// AND THEN,
// DO NOT EDIT THIS FILE ANY FURTHER
//----------------------------------------------------------------------------------------

bool basic_test(bool debug=false)
{
const int MAX = 20;
Expand Down Expand Up @@ -54,13 +48,6 @@ TEST(BASIC_TEST, BasicTest)
}


int main(int argc, char **argv) {
::testing::InitGoogleTest(&argc, argv);
std::cout<<"\n\n----------running basic_test.cpp---------\n\n"<<std::endl;
return RUN_ALL_TESTS();
}


/*
<pre>
00_lab_0 git:(master) ✗ 😊 $> tree includes
Expand All @@ -74,7 +61,6 @@ includes
2 directories, 4 files

00_lab_0 git:(master) ✗ 😊 $> ./build/bin/basic_test
----------running basic_test.cpp---------
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from BASIC_TEST
Expand Down
Binary file added images/mac/a-00-clang_version.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
File renamed without changes
116 changes: 70 additions & 46 deletions mac.md
Original file line number Diff line number Diff line change
@@ -1,98 +1,122 @@
# Mac Instructions</br>

- ### [Installing `git`](#mac_installing_git)</br>
- ### [Installing `cmake`](#mac_installing_cmake)</br>
- ### [Installing `Xcode`](#mac_installing_Xcode)</br>
- ### [Installing `CMake`](#mac_installing_cmake)</br>
- ### [Configuring `Git`](#mac_configure_git)</br>

---

</br>

<a name="mac_installing_git"></a>

## Installing git

</br>

### Install git
<a name="mac_installing_Xcode"></a>

We use [homebrew](https://brew.sh/) to [install git](https://git-scm.com/download/mac).
## Installing Xcode

```sh
$ brew install git
```
You need to install **Xcode Command Line Tools** to use **clang** and **git**

If you see "brew: command not found", then you need to install brew.
### Install Xcode Command Line Tools

```sh
$ /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
To install Xcode Command Line Tools in your terminal, run:
```shell
xcode-select --install
```
Click install and wait until the installation completes

# The following two lines for Apple M1 Processor
### Check clang installation

# you can find the following command in terminal
$ echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/YOUR_DEVICE_NAME/.zprofile
Let's make sure clang is installed correctly

$ eval $(/opt/homebrew/bin/brew shellenv)
```shell
clang --version
```

You need to install **Xcode** from App Store before you use other IDE.
<img src="images/mac/a-00-clang_version.png" alt="git version" width="1000"/>

</br>
If you do not get a response similar to this, then you do not have `CMake` on your system.

### Check git installation

To make sure git is installed correctly

```sh
$ git --version
```shell
git --version
```

<img src="images/mac/a-00-git_version.png" alt="git version" width="1000"/>
<img src="images/mac/a-01-git_version.png" alt="git version" width="1000"/>

</br>

### Login git

Login git with username and email address:
<a name="mac_installing_cmake"></a>

```sh
$ git config --global user.name "stephengineer"
$ git config --global user.email "[email protected]"
```
## Installing cmake

---
### Install cmake

</br>
We use homebrew to install [CMake](https://cmake.org/):

<a name="mac_installing_cmake"></a>
```shell
brew install cmake
```

## Installing cmake
If you see `brew: command not found`, then you need to install brew.

```shell
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
```

</br>

### Install cmake
### Check CMake version

We use homebrew to install [cmake](https://cmake.org/):
To check to see if `CMake` is installed successfully:

```sh
$ brew install cmake
```shell
cmake --version
```

<img src="images/mac/a-02-cmake_version.png" alt="cmake version" width="1000"/>

</br>

### Check cmake version

Let's check to see if `cmake` is installed successfully:
<a name="mac_configure_git"></a>

## Configuring git

### Configure git

Configure git with your username and email address:

```sh
$ cmake --version
```shell
git config --global user.name "stephengineer"
git config --global user.email [email protected]
```

<img src="images/mac/a-01-cmake_version.png" alt="cmake version" width="1000"/>
### Install GitHub CLI

</br>
Installing the CLI

```shell
brew install gh
```

If you do not get a response similar to this, then you do not have `cmake` on your system and you have to install it.
To login to GitHub

```shell
gh auth login
```

The CLI will step you through logging in with your github account

---

Once everything is installed, you can move on to the [next step](start_project.md)
### After you have installed:
- **Xcode Command Line Tools**
- **clang**
- **git**
- **Cmake**
- **GitHub CLI**

you can move on to the [next step](start_project.md)
6 changes: 3 additions & 3 deletions start_project.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,10 +365,10 @@ You should be able to right click on `CMakeLists.txt` and click on `Clean Reconf

A prompt should appear on top, just click on similar compiler to:

- Mac: `Clang 13.0.0`
- Mac: `Clang X.X.X`
<img src="images/project/b-06-compiler_mac.png" alt="compiler_mac" width="1000"/>

- Windows: `GCC 6.3.0 mingw`
- Windows: `GCC X.X.X mingw32`
<img src="images/project/b-07-compiler_win.png" alt="compiler_win" width="1000"/>

</br>
Expand All @@ -379,7 +379,7 @@ If it does not show up, you will need to manually select it on the bottom there

</br>

- If it does not show `GCC 6.3.0 mingw32` click on that button and select it.
- If it does not show `GCC X.X.X mingw32` click on that button and select it.
- If there is no option, try scanning for kits and try again.
- If it still doesn’t show up, you probably messed up your Mingw installation.

Expand Down
Loading