forked from HaniAmmar/Qentem-Engine
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
154 lines (119 loc) · 3.65 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
cmake_minimum_required(VERSION 3.0)
project(Qentem_Engine CXX)
set(CMAKE_CXX_STANDARD 11)
include_directories("Include")
enable_testing()
if(MSVC)
add_compile_options(/W4)
else()
add_compile_options(-Wall -Wextra)
option(ENABLE_COVERAGE "Enable Coverage for gcc/clang" FALSE)
option(ENABLE_AVX2 "Enable AVX2" FALSE)
option(ENABLE_SSE2 "Enable SSE2" FALSE)
if (ENABLE_COVERAGE)
add_compile_options(--coverage -g -O0)
endif()
if (ENABLE_AVX2)
add_compile_options(-D QENTEM_AVX2 -march=native)
elseif(ENABLE_SSE2)
add_compile_options(-D QENTEM_SSE2 -march=native)
endif()
endif()
# TestHelper
add_executable(TestHelperTest Tests/TestHelper.cpp)
add_test(NAME TestHelperTest COMMAND TestHelperTest)
if (ENABLE_COVERAGE)
target_link_libraries(TestHelperTest --coverage)
endif()
# Memory
add_executable(MemoryTest Tests/MemoryTest.cpp)
add_test(NAME MemoryTest COMMAND MemoryTest)
if (ENABLE_COVERAGE)
target_link_libraries(MemoryTest --coverage)
endif()
# StringUtils
add_executable(StringUtilsTest Tests/StringUtilsTest.cpp)
add_test(NAME StringUtilsTest COMMAND StringUtilsTest)
if (ENABLE_COVERAGE)
target_link_libraries(StringUtilsTest --coverage)
endif()
# String
add_executable(StringTest Tests/StringTest.cpp)
add_test(NAME StringTest COMMAND StringTest)
if (ENABLE_COVERAGE)
target_link_libraries(StringTest --coverage)
endif()
# StringStream
add_executable(StringStreamTest Tests/StringStreamTest.cpp)
add_test(NAME StringStreamTest COMMAND StringStreamTest)
if (ENABLE_COVERAGE)
target_link_libraries(StringStreamTest --coverage)
endif()
# Array
add_executable(ArrayTest Tests/ArrayTest.cpp)
add_test(NAME ArrayTest COMMAND ArrayTest)
if (ENABLE_COVERAGE)
target_link_libraries(ArrayTest --coverage)
endif()
# Digit
add_executable(DigitTest Tests/DigitTest.cpp)
add_test(NAME DigitTest COMMAND DigitTest)
if (ENABLE_COVERAGE)
target_link_libraries(DigitTest --coverage)
endif()
# HArray
add_executable(HArrayTest Tests/HArrayTest.cpp)
add_test(NAME HArrayTest COMMAND HArrayTest)
if (ENABLE_COVERAGE)
target_link_libraries(HArrayTest --coverage)
endif()
# Engine
add_executable(EngineTest Tests/EngineTest.cpp)
add_test(NAME EngineTest COMMAND EngineTest)
if (ENABLE_COVERAGE)
target_link_libraries(EngineTest --coverage)
endif()
# ALE
add_executable(ALETest Tests/ALETest.cpp)
add_test(NAME ALETest COMMAND ALETest)
if (ENABLE_COVERAGE)
target_link_libraries(ALETest --coverage)
endif()
# Unicode
add_executable(UnicodeTest Tests/UnicodeTest.cpp)
add_test(NAME UnicodeTest COMMAND UnicodeTest)
if (ENABLE_COVERAGE)
target_link_libraries(UnicodeTest --coverage)
endif()
# JSONUtils
add_executable(JSONUtilsTest Tests/JSONUtilsTest.cpp)
add_test(NAME JSONUtilsTest COMMAND JSONUtilsTest)
if (ENABLE_COVERAGE)
target_link_libraries(JSONUtilsTest --coverage)
endif()
# Value
add_executable(ValueTest Tests/ValueTest.cpp)
add_test(NAME ValueTest COMMAND ValueTest)
if (ENABLE_COVERAGE)
target_link_libraries(ValueTest --coverage)
endif()
# JSON
add_executable(JSONTest Tests/JSONTest.cpp)
add_test(NAME JSONTest COMMAND JSONTest)
if (ENABLE_COVERAGE)
target_link_libraries(JSONTest --coverage)
endif()
# Template
add_executable(TemplateTest Tests/TemplateTest.cpp)
add_test(NAME TemplateTest COMMAND TemplateTest)
if (ENABLE_COVERAGE)
target_link_libraries(TemplateTest --coverage)
endif()
if (NOT ENABLE_AVX2 AND NOT ENABLE_SSE2)
# Template (Wide character)
add_executable(TemplateLTest Tests/TemplateLTest.cpp)
add_test(NAME TemplateLTest COMMAND TemplateLTest)
if (ENABLE_COVERAGE)
target_link_libraries(TemplateLTest --coverage)
endif()
endif()