Skip to content

Commit 7264280

Browse files
committed
stuff
1 parent b7d62b7 commit 7264280

File tree

4 files changed

+61
-15
lines changed

4 files changed

+61
-15
lines changed

.clang_format

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
BasedOnStyle: Google
2+
ColumnLimit: 120
3+
DerivePointerAlignment: false
4+
PointerAlignment: Right
5+
IndentWidth: 2

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,3 +30,6 @@
3030
*.exe
3131
*.out
3232
*.app
33+
34+
# CMake
35+
build/

CMakeLists.txt

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
cmake_minimum_required(VERSION 3.10)
2+
project(Bootcamp
3+
DESCRIPTION "C++ Bootcamp for 15-445/645"
4+
LANGUAGES CXX)
5+
6+
set(BOOTCAMP_CLANG_SEARCH_PATH "/usr/local/bin" "/usr/bin" "/usr/local/opt/llvm/bin" "/usr/local/opt/llvm@14/bin"
7+
"/opt/homebrew/opt/llvm@14/bin/")
8+
9+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
10+
if(CMAKE_CXX_COMPILER_VERSION MATCHES "^14.")
11+
message(STATUS "You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
12+
else()
13+
message(WARNING "!! We recommend that you use clang-14 for this bootcamp. You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, a different version.")
14+
endif()
15+
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
16+
message(STATUS "You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
17+
else()
18+
message(WARNING "!! We recommend that you use clang-14 for this bootcamp. You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, which is not clang.")
19+
endif()
20+
21+
set(CMAKE_CXX_STANDARD 17)
22+
set(CMAKE_CXX_STANDARD_REQUIRED True)
23+
24+
# Compiling move semantics/references executables
25+
add_executable(references src/references.cpp)
26+
add_executable(move_semantics src/move_semantics.cpp)
27+
add_executable(move_constructors src/move_constructors.cpp)
28+
29+
# Compiling templates executables
30+
31+
# Compiling C++ STL executables
32+
33+
# Compiling misc executables
34+
35+
# Find clang_format bin
36+
find_program(CLANG_FORMAT_BIN
37+
NAMES clang-format clang-format-14
38+
HINTS ${BOOTCAMP_CLANG_SEARCH_PATH})

README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,31 @@
55
- meant to be read in the order below
66

77
### References and Move Semantics
8-
references.cpp (draft is done)
9-
move_semantics.cpp (draft is done)
10-
move_constructors.cpp (draft is done)
8+
- references.cpp (draft is done)
9+
- move_semantics.cpp (draft is done)
10+
- move_constructors.cpp (draft is done)
1111

1212
### Templates
13-
templated_functions.cpp (draft is done)
14-
templated_classes.cpp
13+
- templated_functions.cpp (draft is done)
14+
- templated_classes.cpp
1515

1616
### C++ STL Containers
17-
vectors.cpp (draft is done)
18-
set.cpp (draft is done)
19-
unordered_map.cpp (draft is done)
17+
- vectors.cpp (draft is done)
18+
- set.cpp (draft is done)
19+
- unordered_map.cpp (draft is done)
2020

2121
### C++ STL Memory
22-
unique_ptr.cpp (draft is done)
23-
shared_ptr.cpp (draft is done)
22+
- unique_ptr.cpp (draft is done)
23+
- shared_ptr.cpp (draft is done)
2424

2525
### C++ STL Synch Primitives
26-
synch_primitives.cpp
26+
- synch_primitives.cpp
2727

2828
### Misc
29-
wrapper_class.cpp
30-
iterator.cpp
31-
auto.cpp (draft is done)
32-
namespaces.cpp
29+
- wrapper_class.cpp
30+
- iterator.cpp
31+
- auto.cpp (draft is done)
32+
- namespaces.cpp
3333

3434
## Things to Do
3535
- write CMake

0 commit comments

Comments
 (0)