-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
48 lines (48 loc) · 993 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
42
43
44
45
46
47
48
cmake_minimum_required(VERSION 3.20)
project(Chip8)
include(CTest)
if(MSVC)
add_compile_options(/W4 /WX)
else()
# lots of warnings and all warnings as errors
add_compile_options(
-std=c++11
-g
-O0
-pedantic-errors
-fsanitize=address,undefined,leak
-Wall
-Wextra
-Wpedantic
-Wshadow
-Wconversion
-Wfloat-equal
-Wformat-nonliteral
-Wformat-security
-Wformat-y2k
-Wformat=2
-Wimport
-Winvalid-pch
-Wlogical-op
-Wmissing-declarations
-Wmissing-field-initializers
-Wmissing-format-attribute
-Wmissing-include-dirs
-Wmissing-noreturn
-Wpacked
-Wpointer-arith
-Wredundant-decls
-Wstack-protector
-Wstrict-null-sentinel
-Wswitch-enum
-Wundef
-Wwrite-strings)
endif()
add_link_options(-fsanitize=address,undefined,leak)
set(DEBUG ON)
if(DEBUG)
add_definitions(-DDEBUG)
endif()
add_subdirectory(src)
add_subdirectory(tests)
add_test(NAME TestProcessor COMMAND Chip8Test)