-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
57 lines (48 loc) · 1.17 KB
/
Copy pathCMakeLists.txt
File metadata and controls
57 lines (48 loc) · 1.17 KB
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
cmake_minimum_required(VERSION 3.30)
add_library(moot STATIC)
target_include_directories(moot PRIVATE include)
target_include_directories(moot SYSTEM PUBLIC lib)
target_include_directories(moot SYSTEM INTERFACE include)
target_compile_features(moot PUBLIC cxx_std_26)
# For clangd to not show warnings in header files.
set(PUBLIC_DISABLED_WARNINGS
c++98-compat
c++98-compat-pedantic
gnu-anonymous-struct
inaccessible-base
nested-anon-types
padded
pre-c++14-compat
)
list(TRANSFORM PUBLIC_DISABLED_WARNINGS PREPEND "-Wno-")
target_compile_options(moot PUBLIC
${PUBLIC_DISABLED_WARNINGS}
)
set(PRIVATE_DISABLED_WARNINGS
c99-designator
c++20-compat
c++20-extensions
exit-time-destructors
global-constructors
implicit-int-float-conversion
missing-field-initializers
packed-non-pod
pre-c++20-compat-pedantic
switch
switch-default
switch-enum
unsafe-buffer-usage
)
list(TRANSFORM PRIVATE_DISABLED_WARNINGS PREPEND "-Wno-")
target_compile_options(moot PRIVATE
-Weverything
${PRIVATE_DISABLED_WARNINGS}
)
file(GLOB_RECURSE source_files src/*.cc)
target_sources(moot PRIVATE ${source_files})
target_link_libraries(moot PRIVATE
sfml-graphics
sfml-window
sfml-system
lua
)