diff options
author | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-11 19:04:25 (GMT) |
---|---|---|
committer | Daniel Pfeifer <daniel@pfeifer-mail.de> | 2017-05-11 15:57:59 (GMT) |
commit | a890ca2f8dfc640f7096f3ad89a2429315d8b71a (patch) | |
tree | 049828711b1e63db5b2e8c263624005c423c56f2 /Source | |
parent | 8e2f3582eb9cf75c78fbe8232cdacce2357f7efc (diff) | |
download | CMake-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.cxx | 4 |
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); |