MCPcopy Create free account
hub / github.com/Kitware/CMake / main

Function main

Source/cmakemain.cxx:1102–1142  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100} // namespace
1101
1102int main(int ac, char const* const* av)
1103{
1104 cm::optional<cm::StdIo::Console> console = cm::StdIo::Console();
1105
1106 cmsys::Encoding::CommandLineArguments args =
1107 cmsys::Encoding::CommandLineArguments::Main(ac, av);
1108 ac = args.argc();
1109 av = args.argv();
1110
1111 cmSystemTools::InitializeLibUV();
1112 cmSystemTools::FindCMakeResources(av[0]);
1113 if (ac > 1) {
1114 if (strcmp(av[1], "--build") == 0) {
1115 return do_build(ac, av);
1116 }
1117 if (strcmp(av[1], "--install") == 0) {
1118 return do_install(ac, av);
1119 }
1120 if (strcmp(av[1], "--open") == 0) {
1121 return do_open(ac, av);
1122 }
1123 if (strcmp(av[1], "--workflow") == 0) {
1124 return do_workflow(ac, av);
1125 }
1126 if (strcmp(av[1], "-E") == 0) {
1127 return do_command(ac, av, std::move(console));
1128 }
1129 if (strcmp(av[1], "--print-config-dir") == 0) {
1130 std::cout << cmSystemTools::ConvertToOutputPath(
1131 cmSystemTools::GetCMakeConfigDirectory().value_or(
1132 std::string()))
1133 << std::endl;
1134 return 0;
1135 }
1136 }
1137 int ret = do_cmake(ac, av);
1138 if (uv_loop_t* loop = uv_default_loop()) {
1139 uv_loop_close(loop);
1140 }
1141 return ret;
1142}

Callers

nothing calls this directly

Calls 13

MainClass · 0.85
do_buildFunction · 0.85
do_installFunction · 0.85
do_openFunction · 0.85
do_workflowFunction · 0.85
do_commandFunction · 0.85
moveFunction · 0.85
do_cmakeFunction · 0.85
uv_default_loopFunction · 0.85
uv_loop_closeFunction · 0.85
argcMethod · 0.80
argvMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…