Files
CMake/Modules/CXX-DetectStdlib.h
Sharadh Rajaraman b9bb2b1256 CompilerId: detect MSVC STL for clang-cl
Extend C++ stdlib detection to cover Clang with MSVC frontend and
forward configured standard include directories to the probe command.

Also recognize _MSVC_STL_VERSION in CXX-DetectStdlib.h so the
standard library is classified as msvc instead of UNKNOWN in this path.

Issue: #26761
Signed-off-by: Sharadh Rajaraman <r.sharadh@outlook.sg>
2026-07-08 14:27:05 -04:00

13 lines
277 B
C

#include <version>
// clang-format off
#if defined(_LIBCPP_VERSION)
CMAKE-STDLIB-DETECT: libc++
#elif defined(__GLIBCXX__)
CMAKE-STDLIB-DETECT: libstdc++
#elif defined(_MSVC_STL_VERSION)
CMAKE-STDLIB-DETECT: msvc
#else
CMAKE-STDLIB-DETECT: UNKNOWN
#endif
// clang-format on