Skip to content

Commit

Permalink
Add a comment with example output of clang --version
Browse files Browse the repository at this point in the history
  • Loading branch information
DilumAluthge committed Oct 31, 2024
1 parent 53e65d5 commit f387dbb
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/xcode.jl
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ function _is_xcode_clt()
@debug "_active_compiler_is_xcode_clt(): Attempting to run command" cmd
# The `ignorestatus` allows us to proceed if the command does not run successfully.
output = "\n" * strip(read(ignorestatus(cmd), String)) * "\n"

# If this is an Xcode Clang compiler, example output would be:
# > Apple clang version 16.0.0 (clang-1600.0.26.3)
# > Target: arm64-apple-darwin23.6.0
# > Thread model: posix
# > InstalledDir: /Library/Developer/CommandLineTools/usr/bin

installed_dir_m = match(r"\nInstalledDir: ([\w\/]*?)\n", output)
if isnothing(installed_dir_m)
return (; b=false, ver=nothing)
Expand Down

0 comments on commit f387dbb

Please sign in to comment.