microsoft / STL

MSVC's implementation of the C++ Standard Library.
Other
10.19k stars 1.5k forks source link

google benchmark: on some machines, librt is found (despite it being a unix-only library) #2816

Open strega-nil-ms opened 2 years ago

strega-nil-ms commented 2 years ago

In #2780, we have added google benchmark to the build. However, on some machines,

https://github.com/google/benchmark/blob/0d98dba29d66e93259db7daa53a9327df767a415/CMakeLists.txt#L131

finds librt. To get around this, we set HAVE_LIB_RT to OFF in our cmake code, but it would be good to figure out exactly why it's found, given that it should definitely not exist (and results in a build failure):

https://github.com/microsoft/STL/blob/c34f24920e463a71791c2ee3d2bed14926518965/benchmarks/CMakeLists.txt#L37-L38

StephanTLavavej commented 2 years ago

@strega-nil-ms saw this on two of her machines but @barcharcraz didn't - so this seems to be related to something that's installed on the machines, we just don't know what yet.