diff --git a/dbms/src/Core/StringRef.h b/dbms/src/Core/StringRef.h index 8f975120665..3e270400711 100644 --- a/dbms/src/Core/StringRef.h +++ b/dbms/src/Core/StringRef.h @@ -263,6 +263,14 @@ struct StringRefHash : CRC32Hash {}; #else +struct CRC32Hash +{ + size_t operator() (StringRef x) const + { + throw std::logic_error{"Not implemented CRC32Hash without SSE"}; + }; +}; + struct StringRefHash : StringRefHash64 {}; #endif diff --git a/dbms/src/Interpreters/InterpreterCheckQuery.h b/dbms/src/Interpreters/InterpreterCheckQuery.h index 73ec3b2e7ab..95a09e2bff7 100644 --- a/dbms/src/Interpreters/InterpreterCheckQuery.h +++ b/dbms/src/Interpreters/InterpreterCheckQuery.h @@ -1,6 +1,7 @@ #pragma once #include +#include namespace DB { diff --git a/libs/libcommon/include/ext/collection_cast.h b/libs/libcommon/include/ext/collection_cast.h index 5b10e7d72e5..ab46638dee9 100644 --- a/libs/libcommon/include/ext/collection_cast.h +++ b/libs/libcommon/include/ext/collection_cast.h @@ -1,5 +1,6 @@ #pragma once +#include namespace ext { diff --git a/libs/libcommon/include/ext/identity.h b/libs/libcommon/include/ext/identity.h index 0533867dd0b..bc7b62be303 100644 --- a/libs/libcommon/include/ext/identity.h +++ b/libs/libcommon/include/ext/identity.h @@ -1,5 +1,7 @@ #pragma once +#include + namespace ext { /// \brief Identity function for use with other algorithms as a pass-through. diff --git a/utils/check_include.sh b/utils/check_include.sh index 4d8108509d8..5fdbc46a908 100755 --- a/utils/check_include.sh +++ b/utils/check_include.sh @@ -3,12 +3,42 @@ # Finds missing #include <...> # prints compile time, number of includes, use with sort: ./check_include.sh 2>&1 | sort -rk3 pwd=`pwd` -inc="-I. -I./contrib/libdivide -I./contrib/libre2 -I./build/contrib/libre2 -I./contrib/libfarmhash -I./contrib/libmetrohash/src -I./contrib/libdouble-conversion -I./contrib/libcityhash/include -I./contrib/libzookeeper/include -I./contrib/libtcmalloc/include -I./build/contrib/libzlib-ng -I./contrib/libzlib-ng -I./contrib/libpoco/MongoDB/include -I./contrib/libpoco/XML/include -I./contrib/libpoco/Crypto/include -I./contrib/libpoco/Data/ODBC/include -I./contrib/libpoco/Data/include -I./contrib/libpoco/Net/include -I./contrib/libpoco/Util/include -I./contrib/libpoco/Foundation/include -I./contrib/libboost/boost_1_62_0 -I./libs/libmysqlxx/include -I./libs/libcommon/include -I./build/libs/libcommon/include -I./dbms/src -I./build/dbms/src -I./libs/libpocoext/include -I./libs/libzkutil/include -I./libs/libdaemon/include" +inc="-I. \ +-I./contrib/libdivide \ +-I./contrib/libre2 \ +-I./build/contrib/libre2 \ +-I./contrib/libfarmhash \ +-I./contrib/libmetrohash/src \ +-I./contrib/libdouble-conversion \ +-I./contrib/libcityhash/include \ +-I./contrib/libzookeeper/include \ +-I./contrib/libtcmalloc/include \ +-I./build/contrib/libzlib-ng \ +-I./contrib/libzlib-ng \ +-I./contrib/libpoco/MongoDB/include \ +-I./contrib/libpoco/XML/include \ +-I./contrib/libpoco/Crypto/include \ +-I./contrib/libpoco/Data/ODBC/include \ +-I./contrib/libpoco/Data/include \ +-I./contrib/libpoco/Net/include \ +-I./contrib/libpoco/Util/include \ +-I./contrib/libpoco/Foundation/include \ +-I./contrib/libboost/boost_1_62_0 \ +-I./contrib/libbtrie/include \ +-I./libs/libmysqlxx/include \ +-I./libs/libcommon/include \ +-I./build/libs/libcommon/include \ +-I./libs/libpocoext/include \ +-I./libs/libzkutil/include \ +-I./libs/libdaemon/include \ +-I./dbms/src \ +-I./build/dbms/src" + if [ -z $1 ]; then cd .. find dbms libs utils -name *.h -exec sh $pwd/$0 {} \; ; else echo -n "$1 " echo -n `grep "#include" $1| wc -l` " " - echo -e "#include <$1> \n int main() {return 0;}" | bash -c "TIMEFORMAT='%3R'; time g++-6 -c -std=gnu++1y $inc -x c++ -" + echo -e "#include <$1> \n int main() {return 0;}" | bash -c "TIMEFORMAT='%3R'; time g++-6 -c -std=gnu++1z $inc -x c++ -" fi