Building on macos 10.13

Hi! Trying to build on macos with llvm, but fail. Have set

set(USE_LLVM ON)

in config.cmake, but get this error:

– The C compiler identification is AppleClang 10.0.0.10001145
– The CXX compiler identification is AppleClang 10.0.0.10001145
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
– Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc – works
– Detecting C compiler ABI info
– Detecting C compiler ABI info - done
– Detecting C compile features
– Detecting C compile features - done
– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
– Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ – works
– Detecting CXX compiler ABI info
– Detecting CXX compiler ABI info - done
– Detecting CXX compile features
– Detecting CXX compile features - done
– Performing Test SUPPORT_CXX11
– Performing Test SUPPORT_CXX11 - Success
– Build with RPC support…
– Build with Graph runtime support…
– Build VTA runtime with target: sim
– Build with Metal support
CMake Error at cmake/util/FindLLVM.cmake:19 (find_package):
_ Could not find a package configuration file provided by “LLVM” with any of_
_ the following names:_

_ LLVMConfig.cmake_
_ llvm-config.cmake_

_ Add the installation prefix of “LLVM” to CMAKE_PREFIX_PATH or set_
_ “LLVM_DIR” to a directory containing one of the above files. If “LLVM”_
_ provides a separate development package or SDK, be sure it has been_
_ installed._
Call Stack (most recent call first):
_ cmake/modules/LLVM.cmake:5 (find_llvm)_
_ CMakeLists.txt:176 (include)_

– Configuring incomplete, errors occurred!
See also “/Users/vashat/scripts/turi/tvm/build/CMakeFiles/CMakeOutput.log”.
See also “/Users/vashat/scripts/turi/tvm/build/CMakeFiles/CMakeError.log”.

I have llvm installed through homebrew but that does not help. I have also tried to link to USE_LLVM to LLVMConfig.cmake, but still does not work.

Any ideas what could be wrong?

Managed to solvve it now. I needed to do this before cmake …

export LLVM_DIR=/usr/local/Cellar/llvm/7.0.0/lib/cmake