File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed
Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ target_link_libraries(benchmark PUBLIC double-conversion)
77target_link_libraries (benchmark PUBLIC ryu::ryu)
88target_link_libraries (benchmark PUBLIC fmt)
99target_link_libraries (benchmark PUBLIC cxxopts)
10- target_link_libraries (benchmark PUBLIC netlib)
10+ if (NOT WIN32 )
11+ target_link_libraries (benchmark PUBLIC netlib)
12+ target_compile_definitions (benchmark PUBLIC NETLIB_SUPPORTED=1)
13+ endif ()
14+
1115target_link_libraries (benchmark PUBLIC dragonbox::dragonbox_to_chars)
1216
1317include (CheckSourceCompiles)
Original file line number Diff line number Diff line change 2121#define IEEE_8087
2222#include " benchutil.h"
2323#include " cxxopts.hpp"
24+ #if NETLIB_SUPPORTED
2425#include " gdtoa.h"
26+ #endif
2527#include " grisu2.h"
2628#include " random_generators.h"
2729#include < algorithm>
@@ -69,6 +71,7 @@ void process(std::vector<double> &lines) {
6971 }
7072 return volume;
7173 });
74+ #if NETLIB_SUPPORTED
7275 pretty_print (
7376 lines, " netlib" ,
7477 [](std::vector<double > &lines) {
@@ -89,6 +92,9 @@ void process(std::vector<double> &lines) {
8992 return volume;
9093 },
9194 10 );
95+ #else
96+ std::cout << " # netlib not supported" << std::endl;
97+ #endif
9298 pretty_print (lines, " sprintf" , [](std::vector<double > &lines) {
9399 double volume = 0 ;
94100 char buffer[100 ];
You can’t perform that action at this time.
0 commit comments