summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-11 19:04:25 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2017-05-11 15:57:59 (GMT)
commita890ca2f8dfc640f7096f3ad89a2429315d8b71a (patch)
tree049828711b1e63db5b2e8c263624005c423c56f2 /Source
parent8e2f3582eb9cf75c78fbe8232cdacce2357f7efc (diff)
downloadCMake-a890ca2f8dfc640f7096f3ad89a2429315d8b71a.zip
CMake-a890ca2f8dfc640f7096f3ad89a2429315d8b71a.tar.gz
CMake-a890ca2f8dfc640f7096f3ad89a2429315d8b71a.tar.bz2
cmakemain: use script role for -P
Diffstat (limited to 'Source')
-rw-r--r--Source/cmakemain.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx
index f472b8a..6e65955 100644
--- a/Source/cmakemain.cxx
+++ b/Source/cmakemain.cxx
@@ -289,7 +289,9 @@ int do_cmake(int ac, char const* const* av)
int ret = cm.GetSystemInformation(args);
return ret;
}
- cmake cm(cmake::RoleProject);
+ cmake::Role const role =
+ workingMode == cmake::NORMAL_MODE ? cmake::RoleProject : cmake::RoleScript;
+ cmake cm(role);
cm.SetHomeDirectory("");
cm.SetHomeOutputDirectory("");
cmSystemTools::SetMessageCallback(cmakemainMessageCallback, (void*)&cm);