summaryrefslogtreecommitdiffstats
path: root/Source/cmakemain.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-11 00:47:15 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2003-12-11 00:47:15 (GMT)
commitafc33a19909a5db044d19d86a0e8019e29ec5f97 (patch)
tree8163bd741f40649bedd4a833867e7670e30b7599 /Source/cmakemain.cxx
parent5acab1eed1df8508814cb2cafefe9935f7f0f940 (diff)
downloadCMake-afc33a19909a5db044d19d86a0e8019e29ec5f97.zip
CMake-afc33a19909a5db044d19d86a0e8019e29ec5f97.tar.gz
CMake-afc33a19909a5db044d19d86a0e8019e29ec5f97.tar.bz2
ENH: Argument for script mode is -P (process) and take out the automatic script mode
Diffstat (limited to 'Source/cmakemain.cxx')
-rw-r--r--Source/cmakemain.cxx17
1 files changed, 1 insertions, 16 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index 472ea7d..7c9a155 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -183,7 +183,7 @@ int do_cmake(int ac, char** av)
list_all_cached = true;
list_help = true;
}
- else if (strncmp(av[i], "--script", strlen("--script")) == 0)
+ else if (strncmp(av[i], "-P", strlen("-P")) == 0)
{
script_mode = true;
args.push_back(av[i]);
@@ -194,21 +194,6 @@ int do_cmake(int ac, char** av)
}
}
- if ( args.size() > 0 )
- {
- std::string &arg = args[args.size()-1];
- if ( cmSystemTools::StringEndsWith(arg.c_str(), ".cmake") &&
- cmSystemTools::FileExists(arg.c_str()) &&
- !cmSystemTools::FileIsDirectory(arg.c_str()) )
- {
- std::vector<std::string>::iterator it = args.end();
- -- it;
- std::string ar = "--script" + arg;
- args.insert(it, ar);
- script_mode = 1;
- }
- }
-
if(command)
{
int ret = cmake::CMakeCommand(args);