Place contact and version commands in different cpp files
ADD
src/commands_contact.cpp
+#include "vcpkg_Commands.h"
+#include "vcpkg_System.h"
+#include "vcpkg_info.h"
+
+namespace vcpkg::Commands
+{
+ void contact_command(const vcpkg_cmd_arguments& args)
+ {
+ args.check_exact_arg_count(0);
+ System::println("Send an email to %s with any feedback.", Info::email());
+ exit(EXIT_SUCCESS);
+ }
+}

MODIFY
src/commands_help.cpp
src/commands_help.cpp
#include "vcpkg_Commands.h"
#include "vcpkg_System.h"
-#include "vcpkg_info.h"
namespace vcpkg::Commands
{
- void version_command(const vcpkg_cmd_arguments& args)
- {
- args.check_exact_arg_count(0);
- System::println("Vcpkg package management program version %s\n"
- "\n"
- "See LICENSE.txt for license information.", Info::version()
- );
- exit(EXIT_SUCCESS);
- }
-
void help_command(const vcpkg_cmd_arguments& args, const vcpkg_paths& paths)
{
args.check_max_arg_count(1);
@@ -36,13 +25,6 @@ namespace vcpkg::Commands
exit(EXIT_SUCCESS);
}
- void contact_command(const vcpkg_cmd_arguments& args)
- {
- args.check_exact_arg_count(0);
- System::println("Send an email to %s with any feedback.", Info::email());
- exit(EXIT_SUCCESS);
- }
-
void help_topic_valid_triplet(const vcpkg_paths& paths)
{
System::println("Available architecture triplets:");

ADD
src/commands_version.cpp
+#include "vcpkg_Commands.h"
+#include "vcpkg_System.h"
+#include "vcpkg_info.h"
+
+namespace vcpkg::Commands
+{
+ void version_command(const vcpkg_cmd_arguments& args)
+ {
+ args.check_exact_arg_count(0);
+ System::println("Vcpkg package management program version %s\n"
+ "\n"
+ "See LICENSE.txt for license information.", Info::version()
+ );
+ exit(EXIT_SUCCESS);
+ }
+}

MODIFY
vcpkg/vcpkg.vcxproj
vcpkg/vcpkg.vcxproj
<ClCompile Include="..\src\commands_build.cpp" />
<ClCompile Include="..\src\commands_build_external.cpp" />
<ClCompile Include="..\src\commands_cache.cpp" />
+ <ClCompile Include="..\src\commands_contact.cpp" />
<ClCompile Include="..\src\commands_create.cpp" />
<ClCompile Include="..\src\commands_edit.cpp" />
<ClCompile Include="..\src\commands_hash.cpp" />
<ClCompile Include="..\src\commands_remove.cpp" />
<ClCompile Include="..\src\commands_search.cpp" />
<ClCompile Include="..\src\commands_update.cpp" />
+ <ClCompile Include="..\src\commands_version.cpp" />
<ClCompile Include="..\src\vcpkg_cmd_arguments.cpp" />
<ClCompile Include="..\src\commands_helpers.cpp" />
<ClCompile Include="..\src\vcpkg_Dependencies.cpp" />

MODIFY
vcpkg/vcpkg.vcxproj.filters
vcpkg/vcpkg.vcxproj.filters
<ClCompile Include="..\src\commands_available_commands.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="..\src\commands_version.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
+ <ClCompile Include="..\src\commands_contact.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\include\post_build_lint.h">

Place contact and version commands in different cpp files