1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0030682: Configuration, qmake - all warnings are suppressed on macOS target

Fixed inconsistency of compiler flags with genproj.
warn_on+QMAKE_CXXFLAGS_WARN_ON is now used instead of warn_off+QMAKE_CXXFLAGS.
Added No_Exception to DEFINES.
This commit is contained in:
kgv 2019-04-29 18:24:36 +03:00 committed by bugmaster
parent 42451ec057
commit faa0a91133

View File

@ -12,13 +12,11 @@ CONFIG -= debug_and_release
OccGitRoot = $$_PRO_FILE_PWD_/../../../.. OccGitRoot = $$_PRO_FILE_PWD_/../../../..
# Define compilation flags # Define compilation flags
!win32 { DEFINES += OCC_CONVERT_SIGNALS } CONFIG += warn_on
android { QMAKE_CFLAGS_WARN_ON = -Wall
CONFIG += warn_off QMAKE_CXXFLAGS_WARN_ON = -Wall
QMAKE_CFLAGS += -fexceptions -Wno-ignored-qualifiers -Wall win32 {
QMAKE_CXXFLAGS += -fexceptions -Wno-ignored-qualifiers -Wall QMAKE_CFLAGS_WARN_ON = -W4
#android-g++ { QMAKE_CXXFLAGS += -Wno-strict-overflow }
} else:win32 {
QMAKE_CXXFLAGS_WARN_ON = -W4 QMAKE_CXXFLAGS_WARN_ON = -W4
QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa QMAKE_CXXFLAGS_EXCEPTIONS_ON = /EHa
QMAKE_CXXFLAGS_STL_ON = /EHa QMAKE_CXXFLAGS_STL_ON = /EHa
@ -39,15 +37,27 @@ android {
DEFINES += _CRT_SECURE_NO_WARNINGS DEFINES += _CRT_SECURE_NO_WARNINGS
DEFINES += _CRT_NONSTDC_NO_DEPRECATE DEFINES += _CRT_NONSTDC_NO_DEPRECATE
DEFINES += _SCL_SECURE_NO_WARNINGS DEFINES += _SCL_SECURE_NO_WARNINGS
} else:mac { } else {
CONFIG += c++11 CONFIG += c++11
CONFIG += warn_off QMAKE_CFLAGS += -fexceptions
QMAKE_CXXFLAGS += -Wall QMAKE_CXXFLAGS += -fexceptions
QMAKE_CXXFLAGS += -fvisibility=default QMAKE_CXXFLAGS += -fvisibility=default
iphoneos { DEFINES += OCC_CONVERT_SIGNALS
QMAKE_IOS_DEPLOYMENT_TARGET = 8.0 mac {
} else { iphoneos {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.10 QMAKE_IOS_DEPLOYMENT_TARGET = 8.0
} else {
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
}
}
}
!CONFIG(debug, debug|release) {
# disable exceptions in Release builds
DEFINES += No_Exception
HAVE_RelWithDebInfo {
win32 {
CONFIG += force_debug_info
}
} }
} }
@ -126,9 +136,6 @@ win32 {
QMAKE_SUBSTITUTES += occtkgen_libfolder QMAKE_SUBSTITUTES += occtkgen_libfolder
LIBS += -L$$aLibDest LIBS += -L$$aLibDest
HAVE_RelWithDebInfo {
!CONFIG(debug, debug|release) { CONFIG += force_debug_info }
}
equals(TEMPLATE, lib) { equals(TEMPLATE, lib) {
QMAKE_CLEAN += $$DESTDIR/$${TARGET}.dll QMAKE_CLEAN += $$DESTDIR/$${TARGET}.dll
QMAKE_CLEAN += $$aLibDest/$${TARGET}.lib QMAKE_CLEAN += $$aLibDest/$${TARGET}.lib