Skip to content

Commit

Permalink
excluded ClangCL from Clang and included it in "Visual Studio" (#380)
Browse files Browse the repository at this point in the history
  • Loading branch information
petiaccja authored Mar 25, 2022
1 parent 3530ac4 commit c3f119b
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions conan.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,10 @@ macro(_conan_detect_compiler)
conan_cmake_detect_unix_libcxx(_LIBCXX)
set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
endif ()
elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang)
elseif (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang
AND NOT "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
AND NOT "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC")

string(REPLACE "." ";" VERSION_LIST ${CMAKE_${LANGUAGE}_COMPILER_VERSION})
list(GET VERSION_LIST 0 MAJOR)
list(GET VERSION_LIST 1 MINOR)
Expand All @@ -190,7 +193,11 @@ macro(_conan_detect_compiler)
conan_cmake_detect_unix_libcxx(_LIBCXX)
set(_CONAN_SETTING_COMPILER_LIBCXX ${_LIBCXX})
endif ()
elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC)
elseif(${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL MSVC
OR (${CMAKE_${LANGUAGE}_COMPILER_ID} STREQUAL Clang
AND "${CMAKE_${LANGUAGE}_COMPILER_FRONTEND_VARIANT}" STREQUAL "MSVC"
AND "${CMAKE_${LANGUAGE}_SIMULATE_ID}" STREQUAL "MSVC"))

set(_VISUAL "Visual Studio")
_get_msvc_ide_version(_VISUAL_VERSION)
if("${_VISUAL_VERSION}" STREQUAL "")
Expand Down

0 comments on commit c3f119b

Please sign in to comment.