diff --git a/CMakeLists.txt b/CMakeLists.txt index 0304beec50..2e61faed35 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -13,6 +13,11 @@ if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.12") cmake_policy(SET CMP0074 NEW) endif() +# Prefer CMAKE_MSVC_RUNTIME_LIBRARY if possible +if(POLICY CMP0091) + cmake_policy(SET CMP0091 NEW) +endif() + project(opentelemetry-cpp) # Mark variables as used so cmake doesn't complain about them