summaryrefslogtreecommitdiffstats
path: root/Source/cmInstallScriptGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-04-13 02:04:50 (GMT)
committerBrad King <brad.king@kitware.com>2006-04-13 02:04:50 (GMT)
commitd4c5fe840beb029cb60572cabd643feb4e239830 (patch)
tree3bc37efec89d6bf17f6c5cd1efef91d236744031 /Source/cmInstallScriptGenerator.cxx
parent58641b2ceb5d3401e1cb0e4bb897a9fe2329e525 (diff)
downloadCMake-d4c5fe840beb029cb60572cabd643feb4e239830.zip
CMake-d4c5fe840beb029cb60572cabd643feb4e239830.tar.gz
CMake-d4c5fe840beb029cb60572cabd643feb4e239830.tar.bz2
ENH: Added INSTALL(CODE) mode to allow inline specification of install script code. This reduces the need for configuring an install script that needs some variable settings because the install code can set thing up first.
Diffstat (limited to 'Source/cmInstallScriptGenerator.cxx')
-rw-r--r--Source/cmInstallScriptGenerator.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Source/cmInstallScriptGenerator.cxx b/Source/cmInstallScriptGenerator.cxx
index 1322f72..8bcfbc3 100644
--- a/Source/cmInstallScriptGenerator.cxx
+++ b/Source/cmInstallScriptGenerator.cxx
@@ -18,7 +18,8 @@
//----------------------------------------------------------------------------
cmInstallScriptGenerator
-::cmInstallScriptGenerator(const char* script): Script(script)
+::cmInstallScriptGenerator(const char* script, bool code):
+ Script(script), Code(code)
{
}
@@ -31,5 +32,12 @@ cmInstallScriptGenerator
//----------------------------------------------------------------------------
void cmInstallScriptGenerator::GenerateScript(std::ostream& os)
{
- os << "INCLUDE(\"" << this->Script << "\")\n";
+ if(this->Code)
+ {
+ os << this->Script << "\n";
+ }
+ else
+ {
+ os << "INCLUDE(\"" << this->Script << "\")\n";
+ }
}