-
Notifications
You must be signed in to change notification settings - Fork 37
/
main.pro
47 lines (34 loc) · 921 Bytes
/
main.pro
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
# Files
SOURCES += *.cpp
HEADERS += *.h
CONFIG += c++17
QMAKE_CXXFLAGS += -std=c++17
# High warnings levels
QMAKE_CXXFLAGS += -Wall -Wextra -Wshadow -Wnon-virtual-dtor -pedantic -Weffc++ -Werror
# Allow debug and release mode
CONFIG += debug_and_release
# In debug mode, turn on gcov, memcache and UBSAN
CONFIG(debug, debug|release) {
# gcov
QMAKE_CXXFLAGS += -fprofile-arcs -ftest-coverage
LIBS += -lgcov
# helgrind, for helgrind and memcheck
QMAKE_LFLAGS += -pthread -Wl,--no-as-needed
# UBSAN
QMAKE_CXXFLAGS += -fsanitize=undefined
QMAKE_LFLAGS += -fsanitize=undefined
LIBS += -lubsan
}
# In release mode, turn on profiling
CONFIG(release, debug|release) {
DEFINES += NDEBUG
# gprof
QMAKE_CXXFLAGS += -pg
QMAKE_LFLAGS += -pg
}
# Use SFML, detected by test script
CONFIG(sfml) {
message(sfml here)
# SFML
LIBS += -lsfml-graphics -lsfml-window -lsfml-system -lsfml-audio
}