blob: 90dacb1ed08fb865dface0efcd79b19bb00fc17a (
plain) (
blame)
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
|
cmake_minimum_required(
VERSION
3.22
)
project(
luma
VERSION
24
DESCRIPTION
"Reference emulator for the luma platform."
HOMEPAGE_URL
"https://mandelbrot.dk/luma"
LANGUAGES
C
)
set(
CMAKE_C_STANDARD
11
)
# Disable in-souce builds:
if(
"${PROJECT_BINARY_DIR}"
STREQUAL
"${PROJECT_SOURCE_DIR}"
)
message(
FATAL_ERROR
"Building in the source tree is not allowed."
)
endif()
# Include directories:
include_directories(
"${PROJECT_SOURCE_DIR}/include"
"/home/delta/repos/u8c/u8c/include"
)
# Enable compiler warnings:
if(
MSVC
)
add_compile_options(
"/W4"
"/WX"
)
else()
add_compile_options(
"-pedantic-errors"
"-Wfatal-errors"
"-Wall"
"-Wconversion"
"-Werror"
"-Wextra"
"-Wunreachable-code"
"-Wunused"
)
if(
"${CMAKE_CXX_COMPILER_ID}"
STREQUAL
"Clang"
)
add_compile_options(
"-Wnewline-eof"
)
endif()
endif()
# Set compiler optimisations level:
if(
CMAKE_BUILD_TYPE
MATCHES
Release
)
message(
STATUS
"Setting optimisation level..."
)
if(
MSVC
)
add_compile_options(
"/Os"
)
else()
add_compile_options(
"-Os"
)
endif()
endif()
# Sources:
add_executable(
luma
"luma/src/luma_abrt.c"
"luma/src/luma_bootlder.c"
"luma/src/luma_cart.c"
"luma/src/luma_dead.c"
"luma/src/luma_instrPtr.c"
"luma/src/luma_ldBank.c"
"luma/src/luma_ldBootlder.c"
"luma/src/luma_ldRom.c"
"luma/src/luma_mem.c"
"luma/src/luma_memDump.c"
"luma/src/luma_proc.c"
"luma/src/luma_setByte.c"
"luma/src/luma_setDbl.c"
"luma/src/main.c"
)
|