How to differentiate between clang and clang-cl?
问题 I'm new to CMake and I've run into a little bit of a snag here, wondering if there is an "elegant" solution to this problem, or maybe there's just an easy solution. As an example, for setting up compiler flags I'm doing the following: target_compile_options(${PROJECT_NAME} PUBLIC $<$<CXX_COMPILER_ID:GNU>:"-some_gnu_flag"> $<$<CXX_COMPILER_ID:Clang>:"-some_clang_flag"> $<$<CXX_COMPILER_ID:MSVC>:"/some_msvc_flag"> ) This works perfectly as expected, except for when I try a build using clang-cl