From 57a44d15cb7b294d939d151bf41af82a10a1e10b Mon Sep 17 00:00:00 2001 From: Joerg Bornemann Date: Tue, 21 Jun 2022 15:15:58 +0200 Subject: [PATCH] qmake/msbuild: Turn off "use full paths in diagnostics" by default The default setting for "Full Path of Source Code File in Diagnostics" changed with VS 2017: it's now turned on by default. It can also be enabled with the compiler flag /FC, but there is no flag for turning it off. Users might want to disable /FC to obtain reproducable binaries. Change qmake's default from "use Visual Studio's default" to "off" for this feature. Users can enable it manually by putting the following into their project files: QMAKE_CXXFLAGS += /FC CMake faced the same problem. See CMake upstream issue #18261 for comparison. Task-number: QTBUG-104450 Change-Id: Ibe636a0ac5d18aefb44f2b7179b59fcec2ad8353 Reviewed-by: Alexandru Croitor (cherry picked from commit 073214fdf943e1a0beb660a039e39dc1ea43836e) Reviewed-by: Qt Cherry-pick Bot --- qmake/generators/win32/msvc_objectmodel.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qmake/generators/win32/msvc_objectmodel.cpp b/qmake/generators/win32/msvc_objectmodel.cpp index 649379257a3..8709a64a13c 100644 --- a/qmake/generators/win32/msvc_objectmodel.cpp +++ b/qmake/generators/win32/msvc_objectmodel.cpp @@ -410,7 +410,7 @@ VCCLCompilerTool::VCCLCompilerTool() CompileForArchitecture(archUnknown), InterworkCalls(unset), EnablePREfast(unset), - DisplayFullPaths(unset), + DisplayFullPaths(_False), MultiProcessorCompilation(unset), GenerateXMLDocumentationFiles(unset), CreateHotpatchableImage(unset)