diff --git a/src/Functions/CMakeLists.txt b/src/Functions/CMakeLists.txt index bdf89c983f1..126e4c7c57d 100644 --- a/src/Functions/CMakeLists.txt +++ b/src/Functions/CMakeLists.txt @@ -6,24 +6,6 @@ add_headers_and_sources(clickhouse_functions .) list(REMOVE_ITEM clickhouse_functions_sources IFunctionImpl.cpp FunctionFactory.cpp FunctionHelpers.cpp) list(REMOVE_ITEM clickhouse_functions_headers IFunctionImpl.h FunctionFactory.h FunctionHelpers.h) -if (NOT USE_H3) - list (REMOVE_ITEM clickhouse_functions_sources - geoToH3.cpp - h3EdgeAngle.cpp - h3EdgeLengthM.cpp - h3GetBaseCell.cpp - h3GetResolution.cpp - h3HexAreaM2.cpp - h3IndexesAreNeighbors.cpp - h3IsValid.cpp - h3kRing.cpp - h3ToChildren.cpp - h3ToParent.cpp - h3ToString.cpp - stringToH3.cpp - ) -endif () - add_library(clickhouse_functions ${clickhouse_functions_sources}) target_link_libraries(clickhouse_functions diff --git a/src/Functions/geoToH3.cpp b/src/Functions/geoToH3.cpp index 882425c4a77..257c73daa4c 100644 --- a/src/Functions/geoToH3.cpp +++ b/src/Functions/geoToH3.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -94,3 +100,5 @@ void registerFunctionGeoToH3(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3EdgeAngle.cpp b/src/Functions/h3EdgeAngle.cpp index 88995427e6d..7b0b1cdc3a7 100644 --- a/src/Functions/h3EdgeAngle.cpp +++ b/src/Functions/h3EdgeAngle.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -77,3 +83,5 @@ void registerFunctionH3EdgeAngle(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3EdgeLengthM.cpp b/src/Functions/h3EdgeLengthM.cpp index 6626deffd6b..d22074ceee0 100644 --- a/src/Functions/h3EdgeLengthM.cpp +++ b/src/Functions/h3EdgeLengthM.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -81,3 +87,5 @@ void registerFunctionH3EdgeLengthM(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3GetBaseCell.cpp b/src/Functions/h3GetBaseCell.cpp index 80cbf96fe9b..f9bc8bcea20 100644 --- a/src/Functions/h3GetBaseCell.cpp +++ b/src/Functions/h3GetBaseCell.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -70,3 +76,5 @@ void registerFunctionH3GetBaseCell(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3GetResolution.cpp b/src/Functions/h3GetResolution.cpp index 1b7d108dbd1..c73d7ed4f4c 100644 --- a/src/Functions/h3GetResolution.cpp +++ b/src/Functions/h3GetResolution.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -70,3 +76,5 @@ void registerFunctionH3GetResolution(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3HexAreaM2.cpp b/src/Functions/h3HexAreaM2.cpp index 8de17cc1f11..f1e74591785 100644 --- a/src/Functions/h3HexAreaM2.cpp +++ b/src/Functions/h3HexAreaM2.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -76,3 +82,5 @@ void registerFunctionH3HexAreaM2(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3IndexesAreNeighbors.cpp b/src/Functions/h3IndexesAreNeighbors.cpp index d2ba36347a3..bddaffd96bc 100644 --- a/src/Functions/h3IndexesAreNeighbors.cpp +++ b/src/Functions/h3IndexesAreNeighbors.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -78,3 +84,5 @@ void registerFunctionH3IndexesAreNeighbors(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3IsValid.cpp b/src/Functions/h3IsValid.cpp index 9455bec19ee..bd99f57af3e 100644 --- a/src/Functions/h3IsValid.cpp +++ b/src/Functions/h3IsValid.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -70,3 +76,5 @@ void registerFunctionH3IsValid(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3ToChildren.cpp b/src/Functions/h3ToChildren.cpp index d1438c70676..8c0d4d23e96 100644 --- a/src/Functions/h3ToChildren.cpp +++ b/src/Functions/h3ToChildren.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -111,3 +117,5 @@ void registerFunctionH3ToChildren(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3ToParent.cpp b/src/Functions/h3ToParent.cpp index 1f3cafe690f..cbdbbedfcd6 100644 --- a/src/Functions/h3ToParent.cpp +++ b/src/Functions/h3ToParent.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -85,3 +91,5 @@ void registerFunctionH3ToParent(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3ToString.cpp b/src/Functions/h3ToString.cpp index 5f1a93648ad..01d1b02809a 100644 --- a/src/Functions/h3ToString.cpp +++ b/src/Functions/h3ToString.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -86,3 +92,5 @@ void registerFunctionH3ToString(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/h3kRing.cpp b/src/Functions/h3kRing.cpp index 10fea799dd2..883c20d6324 100644 --- a/src/Functions/h3kRing.cpp +++ b/src/Functions/h3kRing.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -108,3 +114,5 @@ void registerFunctionH3KRing(FunctionFactory & factory) } } + +#endif diff --git a/src/Functions/stringToH3.cpp b/src/Functions/stringToH3.cpp index 10cb3120c3f..65e7fa20314 100644 --- a/src/Functions/stringToH3.cpp +++ b/src/Functions/stringToH3.cpp @@ -1,3 +1,9 @@ +#if !defined(ARCADIA_BUILD) +# include "config_functions.h" +#endif + +#if USE_H3 + #include #include #include @@ -101,3 +107,5 @@ void registerFunctionStringToH3(FunctionFactory & factory) } } + +#endif