diff options
author | Evan Martin <martine@danga.com> | 2012-10-30 16:40:59 (GMT) |
---|---|---|
committer | Evan Martin <martine@danga.com> | 2013-02-16 23:15:20 (GMT) |
commit | 10f3e17b6dc7718ab00552300871bbfe49854c8b (patch) | |
tree | 94d4e3bfe8bf9d5daf5292b0d79d059789d7e1fc /src/ninja.cc | |
parent | 27f7528ebdae1586501fb083f8d5d3be711bb367 (diff) | |
download | Ninja-10f3e17b6dc7718ab00552300871bbfe49854c8b.zip Ninja-10f3e17b6dc7718ab00552300871bbfe49854c8b.tar.gz Ninja-10f3e17b6dc7718ab00552300871bbfe49854c8b.tar.bz2 |
add syntax for checking versions
Diffstat (limited to 'src/ninja.cc')
-rw-r--r-- | src/ninja.cc | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/ninja.cc b/src/ninja.cc index 324b884..06dee8a 100644 --- a/src/ninja.cc +++ b/src/ninja.cc @@ -41,16 +41,13 @@ #include "metrics.h" #include "state.h" #include "util.h" +#include "version.h" // Defined in msvc_helper_main-win32.cc. int MSVCHelperMain(int argc, char** argv); namespace { -/// The version number of the current Ninja release. This will always -/// be "git" on trunk. -const char* kVersion = "git"; - /// Global information passed into subtools. struct Globals { Globals() : state(new State()) {} @@ -121,7 +118,7 @@ void Usage(const BuildConfig& config) { " -d MODE enable debugging (use -d list to list modes)\n" " -t TOOL run a subtool (use -t list to list subtools)\n" " terminates toplevel options; further flags are passed to the tool\n", - kVersion, config.parallelism); + kNinjaVersion, config.parallelism); } /// Choose a default value for the -j (parallelism) flag. @@ -772,7 +769,7 @@ int NinjaMain(int argc, char** argv) { working_dir = optarg; break; case OPT_VERSION: - printf("%s\n", kVersion); + printf("%s\n", kNinjaVersion); return 0; case 'h': default: |