comparison src/UNIT_TESTS/qargsut.pro @ 0:04ad7227e290

Rebuilding structure for development.
author John Schneiderman <JohnMS@CodeGNU.com>
date Sat, 14 Jun 2014 13:17:37 +0000
parents
children 49efa3ecaa98
comparison
equal deleted inserted replaced
-1:000000000000 0:04ad7227e290
1 #*******************************************************************************
2 #** This file is part of QtArgs. ***
3 #** ***
4 #** Copyright (C) 2011, 2012, 2014 ***
5 #** CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com> ***
6 #** ***
7 #** This program is free software: you can redistribute it and/or modify ***
8 #** it under the terms of the GNU Lesser General Public License as ***
9 #** published by the Free Software Foundation, either version 3 of the ***
10 #** License, or (at your option) any later version. ***
11 #** ***
12 #** This program is distributed in the hope that it will be useful, but ***
13 #** WITHOUT ANY WARRANTY; without even the implied warranty of ***
14 #** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ***
15 #** See the GNU Lesser General Public License for more details. ***
16 #** ***
17 #** You should have received a copy of the GNU Lesser General Public ***
18 #** License along with this program. If not, see ***
19 #** <http://www.gnu.org/licenses/>. ***
20 #*******************************************************************************
21 TEMPLATE = app
22 QT += testlib
23 QT -= gui
24 DEPENDPATH += ..
25 INCLUDEPATH += ..
26
27 CONFIG += \
28 qt \
29 dynamic \
30 exceptions \
31 stl
32 CONFIG (debug, debug|release) {
33 !buildpass:message(Compiling QtArgs unit test debug build.)
34 TARGET = qtargsutd
35 win32 {
36 LIBS += -lqtargsd1
37 } else {
38 LIBS += -lqtargsd
39 }
40 LIBS += -L../../debug
41 DESTDIR = ../../debug
42 OBJECTS_DIR = debug
43 CONFIG -= release
44 CONFIG += \
45 warn_on \
46 debug
47 linux-g++ {
48 !buildpass:message(Setting GCC debug flags.)
49 QMAKE_CXXFLAGS_DEBUG += \
50 -std=c++98 \ # Conform to ISO standard
51 -pg \ # Enable code profiling
52 -fstack-protector-all \ # Check for buffer overflows
53 -Wall \ # Enable all normal code execution warnings
54 -Wextra \ # Enable extra warnings not enabled by Wall
55 # @bug Currently the build breaks due to QMapNode.
56 # -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor
57 -Wold-style-cast \ # Warn C-style cast is used within a program.
58 -Woverloaded-virtual \ # Warn when a function declaration hides
59 # virtual functions from a base class
60 -Wswitch-enum \ # Warn whenever a switch statement has an index of
61 # enumerated type and lacks a case for one or more
62 # of the named codes of that enumeration.
63 -Wformat-security \ # Warn about uses of format functions
64 # that represent possible security problems.
65 -Wlogical-op \ # Warn about suspicious uses of
66 # logical operators in expressions.
67 -Wstack-protector \ # Warns about functions that will not
68 # be protected against stack smashing.
69 -g3 # Produce debugging information in the OS's native format
70 }
71 win32-g++ {
72 !buildpass:message(Setting MinGW debug flags.)
73 QMAKE_CXXFLAGS_DEBUG += \
74 -Wall \ # Enable all normal code execution warnings
75 -Wextra \ # Enable extra warnings not enabled by Wall
76 # @bug Currently the build breaks due to QMapNode.
77 # -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor
78 -Wold-style-cast \ # Warn C-style cast is used within a program.
79 -Woverloaded-virtual \ # Warn when a function declaration hides
80 # virtual functions from a base class
81 -Wswitch-enum \ # Warn whenever a switch statement has an index of
82 # enumerated type and lacks a case for one or more
83 # of the named codes of that enumeration.
84 -Wformat-security \ # Warn about uses of format functions
85 # that represent possible security problems.
86 -Wlogical-op \ # Warn about suspicious uses of
87 # logical operators in expressions.
88 -Wstack-protector # Warns about functions that will not
89 # be protected against stack smashing.
90 }
91 } else {
92 !buildpass:message(Compiling QtArgs unit test release build.)
93 TARGET = qtargsut
94 win32 {
95 LIBS += -lqtargs1
96 } else {
97 LIBS += -lqtargs
98 }
99 LIBS += -L../../release
100 DESTDIR = ../../release
101 OBJECTS_DIR = release
102 CONFIG -= debug
103 CONFIG += release
104 DEFINES += QT_NO_DEBUG_OUTPUT
105 linux-g++ {
106 !buildpass:message(Setting GCC release flags.)
107 QMAKE_CXXFLAGS_RELEASE += -O3 # Use all optimizations from O2 and more.
108 }
109 }
110 MOC_DIR = $$OBJECTS_DIR
111 UI_DIR = $$OBJECTS_DIR
112
113 HEADERS = qargsut.hpp