diff options
| author | myd7349 <myd7349@gmail.com> | 2019-06-23 08:16:07 +0800 |
|---|---|---|
| committer | myd7349 <myd7349@gmail.com> | 2019-06-23 08:16:07 +0800 |
| commit | 644851da5fbe46aadd0a8fa54e1d7d213f469fb0 (patch) | |
| tree | 3f5d20aca85fcf02375cf553e893c105758a5d39 /toolsrc/src/vcpkg.cpp | |
| parent | f1870ae02bedbaa5a501ddf3a7ba5d0a743a1053 (diff) | |
| parent | f3db66b403840b24ea2612d09cca30a5285f5ea3 (diff) | |
| download | vcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.tar.gz vcpkg-644851da5fbe46aadd0a8fa54e1d7d213f469fb0.zip | |
Merge branch 'master' into sx-init
Diffstat (limited to 'toolsrc/src/vcpkg.cpp')
| -rw-r--r-- | toolsrc/src/vcpkg.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 2c0f562b6..e02bdc71f 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -40,8 +40,10 @@ #include <memory> #include <random> +#if defined(_WIN32) #pragma comment(lib, "ole32") #pragma comment(lib, "shell32") +#endif using namespace vcpkg; @@ -294,11 +296,11 @@ int main(const int argc, const char* const* const argv) Checks::register_global_shutdown_handler([]() { const auto elapsed_us_inner = GlobalState::timer.lock()->microseconds(); - bool debugging = GlobalState::debugging; + bool debugging = Debug::g_debugging; auto metrics = Metrics::g_metrics.lock(); metrics->track_metric("elapsed_us", elapsed_us_inner); - GlobalState::debugging = false; + Debug::g_debugging = false; metrics->flush(); #if defined(_WIN32) @@ -337,14 +339,13 @@ int main(const int argc, const char* const* const argv) const VcpkgCmdArguments args = VcpkgCmdArguments::create_from_command_line(argc, argv); - if (const auto p = args.featurepackages.get()) GlobalState::feature_packages = *p; if (const auto p = args.binarycaching.get()) GlobalState::g_binary_caching = *p; if (const auto p = args.printmetrics.get()) Metrics::g_metrics.lock()->set_print_metrics(*p); if (const auto p = args.sendmetrics.get()) Metrics::g_metrics.lock()->set_send_metrics(*p); - if (const auto p = args.debug.get()) GlobalState::debugging = *p; + if (const auto p = args.debug.get()) Debug::g_debugging = *p; - if (GlobalState::debugging) + if (Debug::g_debugging) { inner(args); Checks::exit_fail(VCPKG_LINE_INFO); @@ -389,6 +390,6 @@ int main(const int argc, const char* const* const argv) } fflush(stdout); - //It is expected that one of the sub-commands will exit cleanly before we get here. + // It is expected that one of the sub-commands will exit cleanly before we get here. Checks::exit_fail(VCPKG_LINE_INFO); } |
