diff --git a/cpp/examples/parquet_io/CMakeLists.txt b/cpp/examples/parquet_io/CMakeLists.txt index 3b87efbac7e..a7d0146b170 100644 --- a/cpp/examples/parquet_io/CMakeLists.txt +++ b/cpp/examples/parquet_io/CMakeLists.txt @@ -17,6 +17,7 @@ project( include(../fetch_dependencies.cmake) add_library(parquet_io_utils OBJECT common_utils.cpp io_source.cpp) +target_compile_features(parquet_io_utils PRIVATE cxx_std_17) target_link_libraries(parquet_io_utils PRIVATE cudf::cudf) # Build and install parquet_io diff --git a/cpp/examples/parquet_io/io_source.cpp b/cpp/examples/parquet_io/io_source.cpp index 342c2749d7a..d3cdf6bb276 100644 --- a/cpp/examples/parquet_io/io_source.cpp +++ b/cpp/examples/parquet_io/io_source.cpp @@ -25,6 +25,7 @@ #include #include +#include #include rmm::host_async_resource_ref pinned_memory_resource() diff --git a/cpp/examples/parquet_io/parquet_io_multithreaded.cpp b/cpp/examples/parquet_io/parquet_io_multithreaded.cpp index b621dcde1c9..6b6a147f3a4 100644 --- a/cpp/examples/parquet_io/parquet_io_multithreaded.cpp +++ b/cpp/examples/parquet_io/parquet_io_multithreaded.cpp @@ -30,6 +30,7 @@ #include #include #include +#include /** * @file parquet_io_multithreaded.cpp @@ -349,11 +350,11 @@ int32_t main(int argc, char const** argv) input_multiplier = std::max(input_multiplier, std::stoi(std::string{argv[2]})); [[fallthrough]]; case 2: - if (auto arg = std::string{argv[1]}; arg == "-h" or arg == "--help") { - print_usage(); - return 0; - } else - input_paths = std::string{argv[1]}; + // Check if instead of input_paths, the first argument is `-h` or `--help` + if (auto arg = std::string{argv[1]}; arg != "-h" and arg != "--help") { + input_paths = std::move(arg); + break; + } [[fallthrough]]; default: print_usage(); throw std::runtime_error(""); }