summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2011-02-22 19:32:48 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2011-02-22 19:32:48 (GMT)
commit6250c7324f874060f43cf760d8ad349add7fb5e2 (patch)
tree222c20c56b64293d6d0b69274862df03ac25b959 /Source/cmMakefile.cxx
parent6dc8c252266f2464ce8067eea2897818067be53d (diff)
parenta58ace68ce3a0ca69d0f7e3f103eab65d7302a9a (diff)
downloadCMake-6250c7324f874060f43cf760d8ad349add7fb5e2.zip
CMake-6250c7324f874060f43cf760d8ad349add7fb5e2.tar.gz
CMake-6250c7324f874060f43cf760d8ad349add7fb5e2.tar.bz2
Merge topic 'fix-2828-more-info-in-script-mode'
a58ace6 Fix KWStyle line-too-long complaint (#2828) 106958c Add CMAKE_ARGC and CMAKE_ARGV0..N-1 variables (#2828) 94d1684 Add CMAKE_SCRIPT_MODE_FILE variable (#2828)
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index e14e44d..3fa846a 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -2744,6 +2744,27 @@ void cmMakefile::SetHomeOutputDirectory(const char* lib)
}
}
+void cmMakefile::SetScriptModeFile(const char* scriptfile)
+{
+ this->AddDefinition("CMAKE_SCRIPT_MODE_FILE", scriptfile);
+}
+
+void cmMakefile::SetArgcArgv(const std::vector<std::string>& args)
+{
+ cmOStringStream strStream;
+ strStream << args.size();
+ this->AddDefinition("CMAKE_ARGC", strStream.str().c_str());
+ //this->MarkVariableAsUsed("CMAKE_ARGC");
+
+ for (unsigned int t = 0; t < args.size(); ++t)
+ {
+ cmOStringStream tmpStream;
+ tmpStream << "CMAKE_ARGV" << t;
+ this->AddDefinition(tmpStream.str().c_str(), args[t].c_str());
+ //this->MarkVariableAsUsed(tmpStream.str().c_str());
+ }
+}
+
//----------------------------------------------------------------------------
cmSourceFile* cmMakefile::GetSource(const char* sourceName)
{