Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: tools/gn/setup.cc

Issue 630223002: gn: Support build directories outside the source tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch that compiles and passes unit tests on both Windows and Linux Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tools/gn/path_output_unittest.cc ('k') | tools/gn/source_dir.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/setup.h" 5 #include "tools/gn/setup.h"
6 6
7 #include <stdlib.h> 7 #include <stdlib.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <sstream> 10 #include <sstream>
(...skipping 423 matching lines...) Expand 10 before | Expand all | Expand 10 after
434 if (scheduler_.verbose_logging()) 434 if (scheduler_.verbose_logging())
435 scheduler_.Log("Using source root", FilePathToUTF8(root_path)); 435 scheduler_.Log("Using source root", FilePathToUTF8(root_path));
436 build_settings_.SetRootPath(root_path); 436 build_settings_.SetRootPath(root_path);
437 437
438 return true; 438 return true;
439 } 439 }
440 440
441 bool Setup::FillBuildDir(const std::string& build_dir, bool require_exists) { 441 bool Setup::FillBuildDir(const std::string& build_dir, bool require_exists) {
442 SourceDir resolved = 442 SourceDir resolved =
443 SourceDirForCurrentDirectory(build_settings_.root_path()). 443 SourceDirForCurrentDirectory(build_settings_.root_path()).
444 ResolveRelativeDir(build_dir); 444 ResolveRelativeDir(build_dir, build_settings_.root_path_utf8());
445 if (resolved.is_null()) { 445 if (resolved.is_null()) {
446 Err(Location(), "Couldn't resolve build directory.", 446 Err(Location(), "Couldn't resolve build directory.",
447 "The build directory supplied (\"" + build_dir + "\") was not valid."). 447 "The build directory supplied (\"" + build_dir + "\") was not valid.").
448 PrintToStdout(); 448 PrintToStdout();
449 return false; 449 return false;
450 } 450 }
451 451
452 if (scheduler_.verbose_logging()) 452 if (scheduler_.verbose_logging())
453 scheduler_.Log("Using build dir", resolved.value()); 453 scheduler_.Log("Using build dir", resolved.value());
454 454
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 } 604 }
605 605
606 void DependentSetup::RunPreMessageLoop() { 606 void DependentSetup::RunPreMessageLoop() {
607 CommonSetup::RunPreMessageLoop(); 607 CommonSetup::RunPreMessageLoop();
608 } 608 }
609 609
610 bool DependentSetup::RunPostMessageLoop() { 610 bool DependentSetup::RunPostMessageLoop() {
611 return CommonSetup::RunPostMessageLoop(); 611 return CommonSetup::RunPostMessageLoop();
612 } 612 }
613 613
OLDNEW
« no previous file with comments | « tools/gn/path_output_unittest.cc ('k') | tools/gn/source_dir.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698