File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed
Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change 55
66include_directories (${CPP-NETLIB_SOURCE_DIR})
77include_directories (${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/src)
8+ include_directories (${CPP-NETLIB_SOURCE_DIR}/deps/cxxopts/include )
89if (OPENSSL_FOUND)
910 include_directories (${OPENSSL_INCLUDE_DIR} )
1011endif (OPENSSL_FOUND)
Original file line number Diff line number Diff line change @@ -29,22 +29,22 @@ int main(int argc, char* argv[]) {
2929 ;
3030
3131 options.parse_positional (std::vector<std::string>{" source" });
32- options.parse (argc, argv);
32+ auto optionsResults = options.parse (argc, argv);
3333
34- if (options .count (" help" )) {
34+ if (optionsResults .count (" help" )) {
3535 std::cout << options.help ({" " , " Group" }) << std::endl;
3636 return EXIT_SUCCESS;
3737 }
3838
39- if (options .count (" source" ) < 1 ) {
39+ if (optionsResults .count (" source" ) < 1 ) {
4040 std::cout << " Error: Source URL required." << std::endl;
4141 std::cout << options.help ({" " , " Group" }) << std::endl;
4242 return EXIT_FAILURE;
4343 }
4444
45- std::string source = options [" source" ].as <std::string>();
46- bool show_headers = options .count (" headers" ) ? true : false ;
47- bool show_status = options .count (" status" ) ? true : false ;
45+ std::string source = optionsResults [" source" ].as <std::string>();
46+ bool show_headers = optionsResults .count (" headers" ) ? true : false ;
47+ bool show_status = optionsResults .count (" status" ) ? true : false ;
4848
4949 http::client::request request (source);
5050 http::client::string_type destination_ = host (request);
You can’t perform that action at this time.
0 commit comments