Skip to content

Commit 3a8bcba

Browse files
authored
build: support clang-cl compiler (#169)
1 parent bc70e5a commit 3a8bcba

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ unset(DD_TRACE_VERSION_CPP_CONTENTS)
5353

5454
message(STATUS "dd-trace-cpp transport=${DD_TRACE_TRANSPORT}")
5555

56-
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
56+
if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC" OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND CMAKE_CXX_COMPILER_FRONTEND_VARIANT MATCHES "MSVC"))
5757
if (BUILD_SHARED_LIBS AND BUILD_STATIC_LIBS)
5858
message(FATAL_ERROR "Can't build both static and shared libary for MSVC")
5959
endif ()

cmake/compiler/msvc.cmake

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,6 @@ if (DD_TRACE_STATIC_CRT)
3737
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
3838
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /MT")
3939
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} /MTd")
40-
# set_target_properties(dd_trace_cpp-specs
41-
# PROPERTIES
42-
# MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>"
43-
# )
4440
endif ()
4541

4642
target_compile_options(dd_trace_cpp-specs

0 commit comments

Comments
 (0)