diff --git a/nvbench/json_printer.cu b/nvbench/json_printer.cu index 1e2d438..f7e337a 100644 --- a/nvbench/json_printer.cu +++ b/nvbench/json_printer.cu @@ -43,10 +43,14 @@ #include #include -#if defined __GNUC__ && !defined __clang__ -#include -#else +#if __has_include() #include +namespace fs = std::filesystem; +#elif __has_include() +#include +namespace fs = std::experimental::filesystem; +#else +static_assert(false, "No or found."); #endif #if NVBENCH_CPP_DIALECT >= 2020 @@ -140,12 +144,6 @@ void json_printer::do_process_bulk_data_float64(state &state, if (hint == "sample_times") { -#if defined __GNUC__ && !defined __clang__ - namespace fs = std::experimental::filesystem; -#else - namespace fs = std::filesystem; -#endif - nvbench::cpu_timer timer; timer.start();