diff options
author | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-28 15:34:29 (GMT) |
---|---|---|
committer | Andy Cedilnik <andy.cedilnik@kitware.com> | 2004-09-28 15:34:29 (GMT) |
commit | e96b0b44cae27130051e4c3bdebdee5c4c1c3c8c (patch) | |
tree | 5e06103dcdcf2de2aff8da0c97ee0aaaf31e541e /Source/kwsys | |
parent | 61d615079760ba50ea194956c1e649c73f89e7ba (diff) | |
download | CMake-e96b0b44cae27130051e4c3bdebdee5c4c1c3c8c.zip CMake-e96b0b44cae27130051e4c3bdebdee5c4c1c3c8c.tar.gz CMake-e96b0b44cae27130051e4c3bdebdee5c4c1c3c8c.tar.bz2 |
ENH: Add accessor for Argv0
Diffstat (limited to 'Source/kwsys')
-rw-r--r-- | Source/kwsys/CommandLineArguments.cxx | 6 | ||||
-rw-r--r-- | Source/kwsys/CommandLineArguments.hxx.in | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/Source/kwsys/CommandLineArguments.cxx b/Source/kwsys/CommandLineArguments.cxx index 9f73dc1..388feb2 100644 --- a/Source/kwsys/CommandLineArguments.cxx +++ b/Source/kwsys/CommandLineArguments.cxx @@ -480,6 +480,12 @@ void CommandLineArguments::SetLineLength(unsigned int ll) } //---------------------------------------------------------------------------- +const char* CommandLineArguments::GetArgv0() +{ + return this->Internals->Argv0.c_str(); +} + +//---------------------------------------------------------------------------- void CommandLineArguments::GenerateHelp() { kwsys_ios::ostringstream str; diff --git a/Source/kwsys/CommandLineArguments.hxx.in b/Source/kwsys/CommandLineArguments.hxx.in index c07dff9..630de59 100644 --- a/Source/kwsys/CommandLineArguments.hxx.in +++ b/Source/kwsys/CommandLineArguments.hxx.in @@ -137,6 +137,11 @@ public: void SetLineLength(unsigned int); unsigned int GetLineLength(); + /** + * Get the executable name (argv0) + */ + const char* GetArgv0(); + protected: void GenerateHelp(); |