mirror of
https://github.com/Kitware/CMake.git
synced 2026-08-12 22:17:06 +00:00
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>
13 lines
277 B
C
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
|