From 300e21d59ebfe42e118cf4e97887f0680fbcfa2f Mon Sep 17 00:00:00 2001 From: Nicole Mazzuca Date: Fri, 9 Aug 2019 11:16:35 -0700 Subject: [vcpkg] Major tool CMakeLists.txt updates - Add the "VCPKG_DEVELOPMENT_WARNINGS" flag - setting "WERROR" will also set this flag - This flag is set by default - on GCC/clang, this will pass '-Wall -Wextra -Wpedantic -Werror' - on GCC, this will additionally pass '-Wmissing-declarations' - on clang, this will additionally pass '-Wmissing-prototypes' - on MSVC, this will pass '-W4 -WX' - On Visual Studio 2017 and later, pass '-permissive-' - Change the source for fallout of these changes - add `format` subcommand - formats all C++ source and header files using clang-format - move `include/vcpkg-test/catch.h` to `include/catch2/catch.hpp` - pass CONFIGURE_DEPENDS to file(GLOB) --- toolsrc/src/vcpkg.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'toolsrc/src/vcpkg.cpp') diff --git a/toolsrc/src/vcpkg.cpp b/toolsrc/src/vcpkg.cpp index 3fdbd0d3e..9cd0ddf19 100644 --- a/toolsrc/src/vcpkg.cpp +++ b/toolsrc/src/vcpkg.cpp @@ -53,7 +53,7 @@ static constexpr int SURVEY_INTERVAL_IN_HOURS = 24 * 30 * 6; // Initial survey appears after 10 days. Therefore, subtract 24 hours/day * 10 days static constexpr int SURVEY_INITIAL_OFFSET_IN_HOURS = SURVEY_INTERVAL_IN_HOURS - 24 * 10; -void invalid_command(const std::string& cmd) +static void invalid_command(const std::string& cmd) { System::print2(System::Color::error, "invalid command: ", cmd, '\n'); Help::print_usage(); @@ -285,6 +285,8 @@ static std::string trim_path_from_command_line(const std::string& full_command_l #endif #if defined(_WIN32) +// note: this prevents a false positive for -Wmissing-prototypes on clang-cl +int wmain(int, const wchar_t* const*); int wmain(const int argc, const wchar_t* const* const argv) #else int main(const int argc, const char* const* const argv) -- cgit v1.2.3