Skip to content

Commit

Permalink
QMake: disabling CCache; making QNetwork configured only where needed
Browse files Browse the repository at this point in the history
  • Loading branch information
dvorka committed Feb 4, 2024
1 parent 10569b0 commit aa5d859
Show file tree
Hide file tree
Showing 6 changed files with 49 additions and 12 deletions.
13 changes: 9 additions & 4 deletions app/app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@ message("= MindForger QMake configuration ==========================")
message("Qt version: $$QT_VERSION")

QT += widgets
QT += network

win32 {
QT += network
}

mfdebug|mfunits {
DEFINES += DO_MF_DEBUG
Expand Down Expand Up @@ -189,9 +192,11 @@ INCLUDEPATH += ./src/qt/spelling
#
win32{
QMAKE_CXXFLAGS += /MP
!mfnoccache {
QMAKE_CXX = ccache $$QMAKE_CXX
}

# DISABLED ccache as it causes compilation error:
# "C1090: PDB API call failed, error code '23'" when used
# when used w/ MS VS compiler:
# !mfnoccache { QMAKE_CXX = ccache $$QMAKE_CXX }
} else {
# linux and macos
mfnoccache {
Expand Down
3 changes: 3 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,10 @@ cache:

# check https://www.appveyor.com/docs/windows-images-software for updates
install:
# QT used by: MF 1.55.*- (VS 2017 - change ABOVE if switching Qt)
- set QT_DIR=C:\Qt\5.9.9\msvc2017_64
# - set C:\Qt\5.12.6\msvc2017_64
# - set QT_DIR=C:\Qt\5.15.2\msvc2019_64
# - set QT_DIR=C:\Qt\5.9.7\msvc2017_64
- set PATH=%PATH%;%QT_DIR%\bin
- set M8R_HOME=%APPVEYOR_BUILD_FOLDER%
Expand Down
2 changes: 2 additions & 0 deletions build/windows/build-win-installer.bat
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,5 @@ C:\Qt\5.12.1\msvc2017_64\bin\windeployqt app\release\mindforger.exe --dir app\r

rem Build installer
"C:\Program Files (x86)\Inno Setup 5\ISCC.exe" /Qp /DVcRedistPath="c:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Redist\MSVC\14.16.27012\vcredist_x64.exe" build\windows\installer\mindforger-setup.iss

echo "Find installer in mindforger/app/release/installer/*.exe"
18 changes: 10 additions & 8 deletions lib/lib.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ TARGET = mindforger
TEMPLATE = lib
CONFIG += staticlib

#win32|macx {
# Qt Network as CURL replacement on Win - add Qt to libmindforger!
win32|macx {
# Qt Network as CURL replacement on Win - add Qt to libmindforger
CONFIG += qt
QT += network
#} else {
# CONFIG -= qt
#}
} else {
CONFIG -= qt
}

# Dependencies:
# - INCLUDEPATH is used during compilation to find included header files.
Expand Down Expand Up @@ -56,9 +56,11 @@ mfdebug|mfunits {
# compiler options (qmake CONFIG+=mfnoccache ...)
win32{
QMAKE_CXXFLAGS += /MP
!mfnoccache {
QMAKE_CXX = ccache $$QMAKE_CXX
}

# DISABLED ccache as it causes compilation error:
# "C1090: PDB API call failed, error code '23'" when used
# when used w/ MS VS compiler:
# !mfnoccache { QMAKE_CXX = ccache $$QMAKE_CXX }
} else {
# linux and macos
mfnoccache {
Expand Down
20 changes: 20 additions & 0 deletions lib/test/mindforger-lib-unit-tests.pro
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,17 @@

TEMPLATE = subdirs

win32|macx {
# Qt Network as CURL replacement on Win - add Qt to libmindforger
CONFIG += qt
QT += network
} else {
CONFIG -= qt
}

message("= MindForger library test QMake configuration ==========================")
message("Qt version: $$QT_VERSION")

SUBDIRS = lib src

# where to find the sub projects - give the folders
Expand All @@ -26,4 +37,13 @@ src.subdir = ./src
# build dependencies
src.depends = lib

# ########################################
# Diagnostics
# ########################################

message(DEFINES of app.pro build: $$DEFINES)
message(QMAKE_EXTRA_TARGETS of app.pro build: $$QMAKE_EXTRA_TARGETS)
message(QT of app.pro build: $$QT)
message(PATH is: $$(PATH))

# eof
5 changes: 5 additions & 0 deletions lib/test/src/src.pro
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,11 @@ win32 {
# compiler options
win32{
QMAKE_CXXFLAGS += /MP

# DISABLED ccache as it causes compilation error:
# "C1090: PDB API call failed, error code '23'" when used
# when used w/ MS VS compiler:
# !mfnoccache { QMAKE_CXX = ccache $$QMAKE_CXX }
} else {
# linux and macos
mfnoccache {
Expand Down

0 comments on commit aa5d859

Please sign in to comment.