New option that disables precompiled headers.

Very often get error cannot write PCH file: No space left on device.
develop
Roman Telezhynskyi 2022-09-13 13:23:22 +03:00
parent 53f53079a3
commit 44a2b9b0f4
2 changed files with 14 additions and 10 deletions

View File

@ -234,6 +234,9 @@ defineTest(forceCopyToDestdir) {
# We use precompiled headers for more fast compilation source code.
defineReplace(set_PCH){
no_ccache{
no_pch{ # To disable recompiled headers (PCH) run qmake with CONFIG+=no_pch
return(true)
} else {
CONFIG += precompile_header # Turn on creation precompiled headers (PCH).
export(CONFIG) # export value to global variable.
@ -245,6 +248,7 @@ defineReplace(set_PCH){
export(PRECOMPILED_SOURCE) # export value to global variable.
}
}
}
return(true)
}

View File

@ -133,13 +133,13 @@ a unique pattern making tool.
%build
%if 0%{?suse_version} > 0
qmake-qt5 PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
qmake-qt5 PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols no_pch"
%else
%if 0%{?mageia} >= 6
qmake PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
qmake PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols no_pch"
%else
qmake-qt5 PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols"
qmake-qt5 PREFIX=%{_prefix} PREFIX_LIB=%{_prefix}/%{_lib} Valentina.pro -r "CONFIG += noTests noRunPath no_ccache noDebugSymbols no_pch"
%endif
%endif