File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -149,6 +149,7 @@ cppan_add_package(
149149 pvt.egorpugin.primitives.pack-master
150150 pvt.egorpugin.primitives.yaml-master
151151 pvt.egorpugin.primitives.win32helpers-master
152+ pvt.egorpugin.primitives.sw.main-master
152153
153154 pvt.egorpugin.primitives.tools.embedder-master
154155
Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ local_settings:
88
99root_project : pvt.cppan.client
1010
11+ add_directories :
12+ - d:/dev/primitives
13+
1114common_settings :
1215 c++ : 17
1316
@@ -180,5 +183,8 @@ projects:
180183
181184 dependencies :
182185 - common
186+ - name : pvt.egorpugin.primitives.sw.main
187+ version : master
188+ local : primitives.sw.main
183189 - pvt.cppan.demo.boost.program_options : 1
184190 - pvt.cppan.demo.yhirose.cpp_linenoise : master
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ file(GLOB cppan_src "*.cpp" "*.h" "*.rc")
1010
1111add_executable (client ${cppan_src} )
1212target_link_libraries (client common
13+ pvt.egorpugin.primitives.sw.main
1314 pvt.cppan.demo.boost.program_options
1415 pvt.cppan.demo.yhirose.cpp_linenoise
1516)
Original file line number Diff line number Diff line change 3939#include < primitives/templates.h>
4040#include < primitives/executor.h>
4141#include < primitives/win32helpers.h>
42+ #include < primitives/sw/main.h>
4243
4344#include < iostream>
4445#include < thread>
@@ -63,8 +64,7 @@ void self_upgrade_copy(const path &dst);
6364optional<int > internal (const Strings &args);
6465void command_init (const Strings &args);
6566
66- int main1 (int argc, char *argv[])
67- try
67+ int main (int argc, char *argv[])
6868{
6969 Strings args;
7070 for (auto i = 0 ; i < argc; i++)
470470
471471 return 0 ;
472472}
473- catch (const std::exception &e)
474- {
475- std::cerr << e.what () << " \n " ;
476- // if (auto st = boost::get_error_info<traced_exception>(e))
477- // std::cerr << *st << '\n';
478- return 1 ;
479- }
480- catch (...)
481- {
482- std::cerr << " Unhandled unknown exception" << " \n " ;
483- return 1 ;
484- }
485-
486- int main (int argc, char *argv[])
487- {
488- auto r = main1 (argc, argv);
489- return r;
490- }
491473
492474void check_spec_file ()
493475{
You can’t perform that action at this time.
0 commit comments