mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
5678d1ed98
* StorageSystemContributors clean * Fix * ARM fixes * Fix arm compile * fix * Fix macos? * Fix includes * fix * fix * Try fix apple build part 1 * Fix identation * Fix static libc++ in clang * fix arm build * better * fix * fix * better check-include
63 lines
2.0 KiB
Bash
Executable File
63 lines
2.0 KiB
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
#set -x
|
|
# sudo apt install time
|
|
# Small .h isolated compile checker
|
|
# Finds missing #include <...>
|
|
# prints compile time, number of includes, use with sort: ./check_include.sh 2>&1 | sort -rk3
|
|
# use with clang: CXX=`which clang++-7 clang++-7.0 clang++-6.0 clang++-5.0 | head -n1` ./check_include.sh
|
|
CUR_DIR=`dirname $0`
|
|
CUR_DIR=`readlink -f $CUR_DIR`
|
|
CUR_DIR="${CUR_DIR}/"
|
|
BUILD_DIR=${BUILD_DIR:=./build}
|
|
inc="-I. \
|
|
-I./contrib/libdivide \
|
|
-I./contrib/re2 \
|
|
-I${BUILD_DIR}/contrib/re2_st \
|
|
-I./contrib/libfarmhash \
|
|
-I./contrib/libmetrohash/src \
|
|
-I./contrib/double-conversion \
|
|
-I./contrib/cityhash102/include \
|
|
-I./contrib/murmurhash/include \
|
|
-I./contrib/zookeeper/src/c/include \
|
|
-I./contrib/zookeeper/src/c/generated \
|
|
-I./contrib/libtcmalloc/include \
|
|
-I${BUILD_DIR}/contrib/zlib-ng \
|
|
-I./contrib/zlib-ng \
|
|
-I./contrib/poco/MongoDB/include \
|
|
-I./contrib/poco/XML/include \
|
|
-I./contrib/poco/Crypto/include \
|
|
-I./contrib/poco/Data/ODBC/include \
|
|
-I./contrib/poco/Data/include \
|
|
-I./contrib/poco/Net/include \
|
|
-I./contrib/poco/Util/include \
|
|
-I./contrib/poco/Foundation/include \
|
|
-I./contrib/boost/libs/*/include \
|
|
-I./contrib/boost \
|
|
-I./contrib/llvm/llvm/include \
|
|
-I${BUILD_DIR}/contrib/llvm/llvm/include \
|
|
-I./contrib/libbtrie/include \
|
|
-I./contrib/libpcg-random/include \
|
|
-I./contrib/capnproto/c++/src \
|
|
-I./contrib/unixodbc/include \
|
|
-I./contrib/unixodbc-cmake/linux_x86_64 \
|
|
-I./libs/libmysqlxx/include \
|
|
-I./libs/libcommon/include \
|
|
-I${BUILD_DIR}/libs/libcommon/include \
|
|
-I./libs/libpocoext/include \
|
|
-I./libs/libzkutil/include \
|
|
-I./libs/libdaemon/include \
|
|
-I./libs/consistent-hashing \
|
|
-I./libs/consistent-hashing-sumbur \
|
|
-I./dbms/src \
|
|
-I${BUILD_DIR}/dbms/src"
|
|
|
|
if [ -z $1 ]; then
|
|
cd ${ROOT_DIR=${CUR_DIR}../..}
|
|
find dbms libs utils \( -name *.h -and -not -name *.inl.h \) -print0 | xargs -0 -n1 sh $CUR_DIR`basename $0`
|
|
else
|
|
echo -n "$1 "
|
|
echo -n `grep "#include" $1| wc -l` " "
|
|
echo "#include <$1> \n int main() {return 0;}" | time --format "%e %M" ${CXX:=g++-7} -c -std=c++1z $inc -x c++ -
|
|
fi
|