benchmark
benchmark copied to clipboard
Windows: support static CRT runtime in CMakeLists.txt
Something like that https://github.com/grpc/grpc/blob/master/cmake/msvc_static_runtime.cmake
Can someone explain the potential benefit? I'm finding it hard to have an opinion without understanding what problem this solves.
The MSVC static/dynamic CRT's aren't compatible so the project being benchmarked is linked with the MSVC static CRT you get a linker error since benchmark.lib is linked with the MSVC dynamic CRT (which is the default).
But no support needs to be added, passing -DCMAKE_CXX_FLAGS_RELEASE=/MT when building the benchmark library will link benchmark.lib with the static CRT.