After I installed the CLion. I used brew install llvm@7
and installed successfully.
The CMake options is set as
-DCMAKE_BUILD_TYPE=Debug
-DLLVM_DIR=/usr/local/Cellar/llvm@/7.0.1/lib/cmake/llvm/
..
And the path for Clang-Tidy is also correct.
/usr/local/Cellar/llvm@7/7.0.1/bin/clang-tidy
However it still occurs with error 'Clang-Tidy not found'
if(NOT CLANG_TIDY_EXECUTABLE)
message(FATAL_ERROR "clang-tidy not found")
endif()
So what could be the reason that Clang-Tidy is not available? I need to use this because Clang-tidy is the linter that used in my course. (I'm new with CLion and CMake)
Thank you!