From db1eefcc740a01fdc06dae50b51409e53c66ad01 Mon Sep 17 00:00:00 2001 From: Damien Mehala Date: Tue, 12 Nov 2024 21:12:07 +0100 Subject: [PATCH] build: support clang-cl compiler --- CMakeLists.txt | 2 +- cmake/compiler/msvc.cmake | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d4cab5f..6f947b3e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -53,7 +53,7 @@ unset(DD_TRACE_VERSION_CPP_CONTENTS) message(STATUS "dd-trace-cpp transport=${DD_TRACE_TRANSPORT}") -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") +if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC")) if (BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS) message(FATAL_ERROR "Can't build both static and shared libary for MSVC") endif () diff --git a/cmake/compiler/msvc.cmake b/cmake/compiler/msvc.cmake index 6b836423..f20e3a20 100644 --- a/cmake/compiler/msvc.cmake +++ b/cmake/compiler/msvc.cmake @@ -37,10 +37,6 @@ if (DD_TRACE_STATIC_CRT) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT") set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd") - # set_target_properties(dd_trace_cpp-specs - # PROPERTIES - # MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" - # ) endif () target_compile_options(dd_trace_cpp-specs