Skip to content

Commit

Permalink
fix brew prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
jhanssen committed Dec 5, 2019
1 parent c3df210 commit 5880922
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions cmake/FindLibClang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,12 @@ if (NOT LIBCLANG_LLVM_CONFIG_EXECUTABLE)
endif ()
if (NOT LIBCLANG_LLVM_CONFIG_EXECUTABLE)
if (APPLE)
execute_process(brew --prefix llvm OUTPUT_VARIABLE BREW_LLVM_PATH RESULT_VARIABLE BREW_LLVM_RESULT)
execute_process(COMMAND brew --prefix llvm OUTPUT_VARIABLE BREW_LLVM_PATH RESULT_VARIABLE BREW_LLVM_RESULT)
if (NOT ${BREW_LLVM_RESULT} EQUAL 0)
set(BREW_LLVM_PATH "/usr/local/opt/llvm/bin")
set(BREW_LLVM_PATH "/usr/local/opt/llvm")
endif ()
find_program(LIBCLANG_LLVM_CONFIG_EXECUTABLE NAMES llvm-config PATHS ${BREW_LLVM_PATH})
string(STRIP ${BREW_LLVM_PATH} BREW_LLVM_PATH)
find_program(LIBCLANG_LLVM_CONFIG_EXECUTABLE NAMES llvm-config PATHS "${BREW_LLVM_PATH}/bin")
else ()
set(llvm_config_names llvm-config)
foreach(major RANGE 9 3)
Expand Down

0 comments on commit 5880922

Please sign in to comment.