summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure.py10
-rw-r--r--src/disk_interface.cc2
-rw-r--r--src/disk_interface.h4
-rw-r--r--src/disk_interface_test.cc2
-rw-r--r--src/subprocess-win32.cc2
-rw-r--r--src/subprocess.cc2
-rw-r--r--src/subprocess.h2
7 files changed, 15 insertions, 9 deletions
diff --git a/configure.py b/configure.py
index c35cf6f..bd3da67 100755
--- a/configure.py
+++ b/configure.py
@@ -103,7 +103,7 @@ else:
if platform == 'windows':
cflags = ['/nologo', '/Zi', '/W4', '/WX', '/wd4530', '/wd4100', '/wd4706',
- '/wd4512', '/wd4800', '/wd4702', '/wd4819',
+ '/wd4512', '/wd4800', '/wd4702', '/wd4819', '/GR-',
'/DNOMINMAX', '/D_CRT_SECURE_NO_WARNINGS',
"/DNINJA_PYTHON=\"%s\"" % (options.with_python,)]
ldflags = ['/DEBUG', '/libpath:$builddir']
@@ -246,6 +246,8 @@ n.comment('Main executable is library plus main() function.')
objs = cxx('ninja')
ninja = n.build(binary('ninja'), 'link', objs, implicit=ninja_lib,
variables=[('libs', libs)])
+if 'ninja' not in ninja:
+ n.build('ninja', 'phony', ninja)
n.newline()
all_targets += ninja
@@ -271,7 +273,8 @@ if options.with_gtest:
os.path.join(path, 'src/gtest_main.cc'),
variables=[('cflags', gtest_cflags)])
- test_cflags = cflags + ['-I%s' % os.path.join(path, 'include')]
+ test_cflags = cflags + ['-DGTEST_HAS_RTTI=0',
+ '-I%s' % os.path.join(path, 'include')]
elif platform == 'windows':
test_libs.extend(['gtest_main.lib', 'gtest.lib'])
else:
@@ -297,9 +300,12 @@ if platform != 'mingw' and platform != 'windows':
ninja_test = n.build(binary('ninja_test'), 'link', objs, implicit=ninja_lib,
variables=[('ldflags', test_ldflags),
('libs', test_libs)])
+if 'ninja_test' not in ninja_test:
+ n.build('ninja_test', 'phony', ninja_test)
n.newline()
all_targets += ninja_test
+
n.comment('Perftest executable.')
objs = cxx('parser_perftest')
parser_perftest = n.build(binary('parser_perftest'), 'link', objs,
diff --git a/src/disk_interface.cc b/src/disk_interface.cc
index 5a36685..74f33c4 100644
--- a/src/disk_interface.cc
+++ b/src/disk_interface.cc
@@ -103,7 +103,7 @@ TimeStamp RealDiskInterface::Stat(const string& path) {
#endif
}
-bool RealDiskInterface::WriteFile(const string & path, const string & contents) {
+bool RealDiskInterface::WriteFile(const string& path, const string& contents) {
FILE * fp = fopen(path.c_str(), "w");
if (fp == NULL) {
Error("WriteFile(%s): Unable to create file. %s", path.c_str(), strerror(errno));
diff --git a/src/disk_interface.h b/src/disk_interface.h
index c0f5ee5..55f8a21 100644
--- a/src/disk_interface.h
+++ b/src/disk_interface.h
@@ -36,7 +36,7 @@ struct DiskInterface {
/// Create a file, with the specified name and contents
/// Returns true on success, false on failure
- virtual bool WriteFile(const string & path, const string & contents) = 0;
+ virtual bool WriteFile(const string& path, const string& contents) = 0;
/// Read a file to a string. Fill in |err| on error.
virtual string ReadFile(const string& path, string* err) = 0;
@@ -58,7 +58,7 @@ struct RealDiskInterface : public DiskInterface {
virtual ~RealDiskInterface() {}
virtual TimeStamp Stat(const string& path);
virtual bool MakeDir(const string& path);
- virtual bool WriteFile(const string & path, const string & contents);
+ virtual bool WriteFile(const string& path, const string& contents);
virtual string ReadFile(const string& path, string* err);
virtual int RemoveFile(const string& path);
};
diff --git a/src/disk_interface_test.cc b/src/disk_interface_test.cc
index 9e460c5..985e991 100644
--- a/src/disk_interface_test.cc
+++ b/src/disk_interface_test.cc
@@ -107,7 +107,7 @@ struct StatTest : public StateTestWithBuiltinRules,
public DiskInterface {
// DiskInterface implementation.
virtual TimeStamp Stat(const string& path);
- virtual bool WriteFile(const string& path, const string & contents) {
+ virtual bool WriteFile(const string& path, const string& contents) {
assert(false);
return true;
}
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index fef0bc8..7842114 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -207,7 +207,7 @@ BOOL WINAPI SubprocessSet::NotifyInterrupted(DWORD dwCtrlType) {
return FALSE;
}
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const string& command) {
Subprocess *subprocess = new Subprocess;
if (!subprocess->Start(this, command)) {
delete subprocess;
diff --git a/src/subprocess.cc b/src/subprocess.cc
index 25b1bda..0d240b1 100644
--- a/src/subprocess.cc
+++ b/src/subprocess.cc
@@ -172,7 +172,7 @@ SubprocessSet::~SubprocessSet() {
Fatal("sigprocmask: %s", strerror(errno));
}
-Subprocess *SubprocessSet::Add(const string &command) {
+Subprocess *SubprocessSet::Add(const string& command) {
Subprocess *subprocess = new Subprocess;
if (!subprocess->Start(this, command)) {
delete subprocess;
diff --git a/src/subprocess.h b/src/subprocess.h
index 3294416..4c1629c 100644
--- a/src/subprocess.h
+++ b/src/subprocess.h
@@ -75,7 +75,7 @@ struct SubprocessSet {
SubprocessSet();
~SubprocessSet();
- Subprocess *Add(const string &command);
+ Subprocess* Add(const string& command);
bool DoWork();
Subprocess* NextFinished();
void Clear();