You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
nmWATI/Src4/setting.pri

70 lines
2.4 KiB
Plaintext

CONFIG += separate_debug_info
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
lessThan(QT_MAJOR_VERSION, 5): QT += gui
#qtHaveModule(printsupport): QT += printsupport
# 代码根目录
geoHome = $$PWD/..
# 常用目录
wtInclude = $${geoHome}/Include
wtSrc = $${geoHome}/Src
#wtBin = $${geoHome}/Bin
greaterThan(QT_MAJOR_VERSION, 4): wtBin = $${geoHome}/Bin5
lessThan(QT_MAJOR_VERSION, 5): wtBin = $${geoHome}/Bin
CONFIG(debug, debug|release){
DESTDIR = $${wtBin}/Debug
DEFINES += _DEBUG
win32-msvc*{
}
else{
QMAKE_CXXFLAGS += -g # for debugging
QMAKE_CXXFLAGS += -fno-omit-frame-pointer # for debugging
}
}
CONFIG(release, debug|release) {
DESTDIR = $${wtBin}/Release
DEFINES += NDEBUG
win32-msvc*{
QMAKE_CXXFLAGS += -Zi
QMAKE_LFLAGS += /DEBUG
}
else{
QMAKE_CXXFLAGS += -g1 # for debugging
}
}
win32-msvc*{
QMAKE_CXXFLAGS += -w44819 # The file contains a character that cannot be represented in the current code page (number)
QMAKE_CXXFLAGS += -w44996 # The compiler encountered a function that was marked with deprecated.
QMAKE_CXXFLAGS += -w44100 # The formal parameter is not referenced in the body of the function. The unreferenced parameter is ignored.
QMAKE_CXXFLAGS += -w44290 # C++ exception specification ignored except to indicate a function is not __declspec(nothrow)
QMAKE_CXXFLAGS += -w44250 # inherits xxx via dominance
QMAKE_CXXFLAGS += -w24101 # unreferenced local variable
QMAKE_CXXFLAGS += -we4238 # nonstandard extension used : class rvalue used as lvalue
QMAKE_CXXFLAGS += -we4239 # nonstandard extension used : 'token' : conversion from 'type' to 'type'
}else{
QMAKE_CXXFLAGS += -std=c++0x
QMAKE_CXXFLAGS += -Wno-unused-parameter # 关闭警告: 未使用的函数形参. 很正常
QMAKE_CXXFLAGS += -Werror=return-type # treat missing return value as error
QMAKE_CXXFLAGS += -Wno-sign-compare # 关闭警告: 有符号数和无符号数比较. 一般来说是正常的, 特殊情况也容易通过调试查出.
QMAKE_CXXFLAGS += -Wno-reorder # 关闭警告: 类成员初始化顺序和定义顺序不同. 估计99.9%的类都不会有这个问题, 剩下的0.1%也很容易通过调试查出.
}
win32-g++{
# CONFIG += silent # may cause jom.exe failed
# QMAKE_LFLAGS += -static -static-libgcc -static-libstdc++
}
LIBS += -L$${DESTDIR} # Lib目录和输出目录相同
INCLUDEPATH += .
INCLUDEPATH += $${wtInclude}
# Avoid vorbose warning