-
Notifications
You must be signed in to change notification settings - Fork 34
/
CMakeLists.txt
51 lines (40 loc) · 1.4 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
cmake_minimum_required(VERSION 3.5)
project(CppDesignPatterns)
set (CMAKE_CXX_STANDARD 11)
set(PATTERNS
CreationalPatterns/abstract-factory
CreationalPatterns/builder
CreationalPatterns/factory-method
CreationalPatterns/prototype
CreationalPatterns/singleton
StructuralPatterns/adapter
StructuralPatterns/bridge
StructuralPatterns/proxy
StructuralPatterns/composite
StructuralPatterns/decorator
StructuralPatterns/facade
StructuralPatterns/flyweight
BehaviroalPatterns/chain-of-responsibility
BehaviroalPatterns/command
BehaviroalPatterns/interpreter
BehaviroalPatterns/iterator
BehaviroalPatterns/mediator
BehaviroalPatterns/memento
BehaviroalPatterns/observer
BehaviroalPatterns/state
BehaviroalPatterns/strategy
BehaviroalPatterns/template-method
BehaviroalPatterns/visitor
)
foreach(_dir IN ITEMS ${PATTERNS})
file(GLOB _files "${_dir}/*.cxx")
message(STATUS "Pattern `${_dir}':")
foreach(_file IN ITEMS ${_files})
get_filename_component(_file_name
${_file} NAME
)
set(_project_name "${_file_name}")
message(STATUS " ${_dir}/${_file_name} is going to be built")
add_executable(${_project_name} "${_dir}/${_file_name}")
endforeach()
endforeach()