These are the steps I followed to compile clickhouse on OSX mojave (10.4.3). These might not be the best way to make it compile on OSX, my knowledge about C++ and build tooling is really limited but they do the work.
clickhouse sha-1: 2ad4df1d6a
compile command (apply the patch below before running cmake)
cmake .. -DCMAKE_CXX_COMPILER=`which clang++` -DCMAKE_C_COMPILER=`which clang` -DCMAKE_BUILD_TYPE=Debug -DENABLE_MYSQL=0 -DUSE_STATIC_LIBRARIES=1 -DNO_WERROR=1 -DENABLE_TESTS=0 -DUSE_RDKAFKA=0
ninja clickhouse
with USE_STATIC_LIBRARIES=0 clickhouse binary won't start.
✗ clang --version
Apple LLVM version 10.0.1 (clang-1001.0.46.4)
Target: x86_64-apple-darwin18.2.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin