Skip to content

Commit 0b06164

Browse files
committed
[cli] Detect clang version
1 parent 2519212 commit 0b06164

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/shim.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,10 @@ rust::Str geographiclib_version() noexcept {
5757
}
5858

5959
rust::Str compiler_version() noexcept {
60-
#ifdef _MSC_VER
60+
#if defined(_MSC_VER)
6161
return "MSVC " STRINGIFY(_MSC_VER);
62+
#elif defined(__clang__)
63+
return "clang " STRINGIFY(__clang_major__) "." STRINGIFY(__clang_minor__) "." STRINGIFY(__clang_patchlevel__);
6264
#else
6365
return "unknown";
6466
#endif

0 commit comments

Comments
 (0)