-
Notifications
You must be signed in to change notification settings - Fork 84
/
CMakeLists.txt
42 lines (36 loc) · 990 Bytes
/
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
cmake_minimum_required(VERSION 2.6)
project(DesignPattern)
set(CMAKE_CXX_STANDARD 11)
set(PATTERNS
AbstractFactoryPattern
AdapterPattern
BridgePattern
BuilderPattern
ChainOfResponsibilityPattern
CommandPattern
CompositePattern
DecoratorPattern
FacadePattern
FactoryPattern
FlyweightPattern
InterpreterPattern
IteratorPattern
MediatorPattern
MementoPattern
ObserverPattern
PrototypePattern
ProxyPattern
SingletonPattern
StatePattern
StrategyPattern
TemplatePattern
VisitorPattern)
macro(add_pattern PATTERN)
include_directories(${PATTERN})
file(GLOB_RECURSE PATTERN_FILES "${PATTERN}/*.cpp")
add_executable(${PATTERN} ${PATTERN_FILES})
endmacro(add_pattern)
foreach(PATTERN IN LISTS PATTERNS)
message(STATUS "Found Pattern: ${PATTERN}")
add_pattern(${PATTERN})
endforeach(PATTERN)