mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-19 11:18:40 +08:00
cmakemain: use script role for -P
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user