-
Notifications
You must be signed in to change notification settings - Fork 3
/
CMakeLists.txt
57 lines (49 loc) · 1.43 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
49
50
51
52
53
54
55
56
57
cmake_minimum_required(VERSION 3.5)
set(CMAKE_SUPPRESS_REGENERATION true)
project(CompFab)
# Enable C++ 11
set(CMAKE_CXX_STANDARD 11)
# Suppress warnings.
add_definitions(
-D_CRT_SECURE_NO_WARNINGS
)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release)
endif()
if(UNIX)
set(GCC_COVERAGE_COMPILE_FLAGS "-Wno-format")
set(GCC_COVERAGE_COMPILE_FLAGS "-Wno-unused-result")
add_definitions(${GCC_COVERAGE_COMPILE_FLAGS})
endif()
# Expose PROJECT_SOURCE_DIR to the source code.
add_definitions(-DPROJECT_SOURCE_DIR="${PROJECT_SOURCE_DIR}")
# Externals
set(EXTERNAL_ROOT ${PROJECT_SOURCE_DIR}/Externals)
add_subdirectory(${EXTERNAL_ROOT})
get_directory_property(EXTERNAL_HEADER
DIRECTORY ${EXTERNAL_ROOT}
DEFINITION EXTERNAL_HEADER)
# Common
set(COMMON_ROOT ${PROJECT_SOURCE_DIR}/Common)
add_subdirectory(${COMMON_ROOT})
get_directory_property(COMMON_HEADER
DIRECTORY ${COMMON_ROOT}
DEFINITION COMMON_HEADER)
# Include each assignment
if (NOT ${HW} OR ${HW} EQUAL "all")
add_subdirectory(assignment1)
add_subdirectory(assignment2)
add_subdirectory(assignment3)
add_subdirectory(assignment4)
add_subdirectory(assignment5)
elseif (${HW} EQUAL "1")
add_subdirectory(assignment1)
elseif (${HW} EQUAL "2")
add_subdirectory(assignment2)
elseif (${HW} EQUAL "3")
add_subdirectory(assignment3)
elseif (${HW} EQUAL "4")
add_subdirectory(assignment4)
elseif (${HW} EQUAL "5")
add_subdirectory(assignment5)
endif()