-
Notifications
You must be signed in to change notification settings - Fork 151
/
CMakeLists.txt
48 lines (41 loc) · 1.94 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.10)
project(Bootcamp
DESCRIPTION "C++ Bootcamp for 15-445/645"
LANGUAGES CXX)
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
if(CMAKE_CXX_COMPILER_VERSION MATCHES "^14.")
message(STATUS "You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
else()
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.")
endif()
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang")
message(STATUS "You're using ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}")
else()
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.")
endif()
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Compiling move semantics/references executables
add_executable(references src/references.cpp)
add_executable(move_semantics src/move_semantics.cpp)
add_executable(move_constructors src/move_constructors.cpp)
# Compiling templates executables
add_executable(templated_functions src/templated_functions.cpp)
add_executable(templated_classes src/templated_classes.cpp)
# Compiling C++ STL executables
add_executable(vectors src/vectors.cpp)
add_executable(sets src/sets.cpp)
add_executable(unordered_maps src/unordered_maps.cpp)
add_executable(unique_ptr src/unique_ptr.cpp)
add_executable(shared_ptr src/shared_ptr.cpp)
add_executable(mutex src/mutex.cpp)
add_executable(scoped_lock src/scoped_lock.cpp)
add_executable(condition_variable src/condition_variable.cpp)
add_executable(rwlock src/rwlock.cpp)
# Compiling misc executables
add_executable(wrapper_class src/wrapper_class.cpp)
add_executable(iterator src/iterator.cpp)
add_executable(auto src/auto.cpp)
add_executable(namespaces src/namespaces.cpp)
# Compiling bootcamp demo code
add_executable(s24_my_ptr src/spring2024/s24_my_ptr.cpp)