view 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
line wrap: on
line source

#*******************************************************************************
#**  This file is part of QtArgs.                                            ***
#**                                                                          ***
#**  Copyright (C) 2011, 2012, 2014                                          ***
#**  CodeGNU Solutions <Licensing _AT_ CodeGNU _DOT_ com>                    ***
#**                                                                          ***
#**  This program is free software: you can redistribute it and/or modify    ***
#**  it under the terms of the GNU Lesser General Public License as          ***
#**  published by the Free Software Foundation, either version 3 of the      ***
#**  License, or (at your option) any later version.                         ***
#**                                                                          ***
#**  This program is distributed in the hope that it will be useful, but     ***
#**  WITHOUT ANY WARRANTY; without even the implied warranty of              ***
#**  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                    ***
#**  See the GNU Lesser General Public License for more details.             ***
#**                                                                          ***
#**  You should have received a copy of the GNU Lesser General Public        ***
#**  License along with this program. If not, see                            ***
#**  <http://www.gnu.org/licenses/>.                                         ***
#*******************************************************************************
TEMPLATE = app
QT += testlib
QT -= gui
DEPENDPATH += ..
INCLUDEPATH += ..

CONFIG +=   \
    qt \
    dynamic \
    exceptions \
    stl
CONFIG (debug, debug|release) {
    !buildpass:message(Compiling QtArgs unit test debug build.)
    TARGET = qtargsutd
win32 {
    LIBS += -lqtargsd1
} else {
    LIBS += -lqtargsd
}
    LIBS += -L../../debug
    DESTDIR =   ../../debug
    OBJECTS_DIR = debug
    CONFIG -=   release
    CONFIG +=   \
	   warn_on \
	   debug
    linux-g++ {
	   !buildpass:message(Setting GCC debug flags.)
	   QMAKE_CXXFLAGS_DEBUG += \
		  -std=c++98 \ # Conform to ISO standard
		  -pg \ # Enable code profiling
		  -fstack-protector-all \ # Check for buffer overflows
		  -Wall \ # Enable all normal code execution warnings
		  -Wextra \ # Enable extra warnings not enabled by Wall
# @bug Currently the build breaks due to QMapNode.
#            -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor
		  -Wold-style-cast \ # Warn C-style cast is used within a program.
		  -Woverloaded-virtual \ # Warn when a function declaration hides
							# virtual functions from a base class
		  -Wswitch-enum \ # Warn whenever a switch statement has an index of
					   # enumerated type and lacks a case for one or more
					   # of the named codes of that enumeration.
		  -Wformat-security \ # Warn about uses of format functions
						  # that represent possible security problems.
		  -Wlogical-op \ # Warn about suspicious uses of
					  # logical operators in expressions.
		  -Wstack-protector \ # Warns about functions that will not
						  # be protected against stack smashing.
		  -g3 # Produce debugging information in the OS's native format
    }
    win32-g++ {
	   !buildpass:message(Setting MinGW debug flags.)
	   QMAKE_CXXFLAGS_DEBUG += \
		  -Wall \ # Enable all normal code execution warnings
		  -Wextra \ # Enable extra warnings not enabled by Wall
# @bug Currently the build breaks due to QMapNode.
#            -Wctor-dtor-privacy \ # Warn if a class seems unusable due to ctor
		  -Wold-style-cast \ # Warn C-style cast is used within a program.
		  -Woverloaded-virtual \ # Warn when a function declaration hides
							# virtual functions from a base class
		  -Wswitch-enum \ # Warn whenever a switch statement has an index of
					   # enumerated type and lacks a case for one or more
					   # of the named codes of that enumeration.
		  -Wformat-security \ # Warn about uses of format functions
						  # that represent possible security problems.
		  -Wlogical-op \ # Warn about suspicious uses of
					  # logical operators in expressions.
		  -Wstack-protector # Warns about functions that will not
						# be protected against stack smashing.
    }
 } else {
    !buildpass:message(Compiling QtArgs unit test release build.)
    TARGET = qtargsut
win32 {
    LIBS += -lqtargs1
} else {
    LIBS += -lqtargs
}
    LIBS += -L../../release
    DESTDIR =   ../../release
    OBJECTS_DIR = release
    CONFIG -=   debug
    CONFIG +=   release
    DEFINES +=  QT_NO_DEBUG_OUTPUT
    linux-g++ {
	   !buildpass:message(Setting GCC release flags.)
	   QMAKE_CXXFLAGS_RELEASE += -O3 # Use all optimizations from O2 and more.
    }
}
MOC_DIR = $$OBJECTS_DIR
UI_DIR = $$OBJECTS_DIR

HEADERS = qargsut.hpp