Skip to content

Commit

Permalink
build: support clang-cl compiler
Browse files Browse the repository at this point in the history
  • Loading branch information
dmehala committed Nov 15, 2024
1 parent bc70e5a commit db1eefc
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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 ()
Expand Down
4 changes: 0 additions & 4 deletions cmake/compiler/msvc.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ if (DD_TRACE_STATIC_CRT)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>: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$<$<CONFIG:Debug>:Debug>"
# )
endif ()

target_compile_options(dd_trace_cpp-specs
Expand Down

0 comments on commit db1eefc

Please sign in to comment.