diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2018-04-23 16:00:34 +0200 |
---|---|---|
committer | Sami Nurmenniemi <sami.nurmenniemi@qt.io> | 2018-05-03 08:38:32 +0000 |
commit | 554e44b77de8df75cfa7b9a4dc81a795509e7de9 (patch) | |
tree | c3bdf599cb2bd76eb7c2254f4d41077c3f172fa4 | |
parent | be78baa165e238c1a3febe21ebaf7cacc133d48b (diff) |
qmake: Don't map Xcode SYMROOT to output directory
The output directory may be the same as the source directory in
the case of an in-source build, but Xcode treats the SYMROOT as
a build directory, and automatically excludes it from Time Machine
backups, which may result in not backing up sources.
Instead we map SYMROOT to an .xcode subdirectory of the output
directory, and then use CONFIGURATION_BUILD_DIR to make sure
the final build targets end up where they used to.
Task-number: QTBUG-52474
Change-Id: I3852ca9088e75ca62fca4c1217b5485175d9436f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 7c3053b301a70b04f5ab4ed9c3f3a6c84cb89616)
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rw-r--r-- | qmake/generators/mac/pbuilder_pbx.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/qmake/generators/mac/pbuilder_pbx.cpp b/qmake/generators/mac/pbuilder_pbx.cpp index db7a1b2714..6ef60e97b2 100644 --- a/qmake/generators/mac/pbuilder_pbx.cpp +++ b/qmake/generators/mac/pbuilder_pbx.cpp @@ -1602,7 +1602,17 @@ ProjectBuilderMakefileGenerator::writeMakeParts(QTextStream &t) } } - t << "\t\t\t\t" << writeSettings("SYMROOT", Option::output_dir) << ";\n"; + // The symroot is marked by xcodebuild as excluded from Time Machine + // backups, as it's a temporary build dir, so we don't want it to be + // the same as the possibe in-source dir, as that would leave out + // sources from being backed up. + t << "\t\t\t\t" << writeSettings("SYMROOT", + Option::output_dir + Option::dir_sep + ".xcode") << ";\n"; + + // The configuration build dir however is not treated as excluded, + // so we can safely point it to the root output dir. + t << "\t\t\t\t" << writeSettings("CONFIGURATION_BUILD_DIR", + Option::output_dir + Option::dir_sep + "$(CONFIGURATION)") << ";\n"; if (!project->isEmpty("DESTDIR")) { ProString dir = project->first("DESTDIR"); |