mirror of https://github.com/ByConity/ByConity
Merge branch 'master' into dev-nf
This commit is contained in:
commit
a39ba57e8c
|
@ -24,3 +24,6 @@ Detailed description / Documentation draft:
|
|||
By adding documentation, you'll allow users to try your new feature immediately, not when someone else will have time to document it later. Documentation is necessary for all features that affect user experience in any way. You can add brief documentation draft above, or add documentation right into your patch as Markdown files in [docs](https://github.com/ClickHouse/ClickHouse/tree/master/docs) folder.
|
||||
|
||||
If you are doing this for the first time, it's recommended to read the lightweight [Contributing to ClickHouse Documentation](https://github.com/ClickHouse/ClickHouse/tree/master/docs/README.md) guide first.
|
||||
|
||||
|
||||
Information about CI checks: https://clickhouse.tech/docs/en/development/continuous-integration/
|
||||
|
|
|
@ -180,3 +180,9 @@
|
|||
[submodule "contrib/stats"]
|
||||
path = contrib/stats
|
||||
url = https://github.com/kthohr/stats.git
|
||||
[submodule "contrib/krb5"]
|
||||
path = contrib/krb5
|
||||
url = https://github.com/krb5/krb5
|
||||
[submodule "contrib/cyrus-sasl"]
|
||||
path = contrib/cyrus-sasl
|
||||
url = https://github.com/cyrusimap/cyrus-sasl
|
||||
|
|
193
CHANGELOG.md
193
CHANGELOG.md
|
@ -1,3 +1,196 @@
|
|||
## ClickHouse release 20.7
|
||||
|
||||
### ClickHouse release v20.7.2.30-stable, 2020-08-31
|
||||
|
||||
#### Backward Incompatible Change
|
||||
|
||||
* Function `modulo` (operator `%`) with at least one floating point number as argument will calculate remainder of division directly on floating point numbers without converting both arguments to integers. It makes behaviour compatible with most of DBMS. This also applicable for Date and DateTime data types. Added alias `mod`. This closes [#7323](https://github.com/ClickHouse/ClickHouse/issues/7323). [#12585](https://github.com/ClickHouse/ClickHouse/pull/12585) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Deprecate special printing of zero Date/DateTime values as `0000-00-00` and `0000-00-00 00:00:00`. [#12442](https://github.com/ClickHouse/ClickHouse/pull/12442) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* The function `groupArrayMoving*` was not working for distributed queries. It's result was calculated within incorrect data type (without promotion to the largest type). The function `groupArrayMovingAvg` was returning integer number that was inconsistent with the `avg` function. This fixes [#12568](https://github.com/ClickHouse/ClickHouse/issues/12568). [#12622](https://github.com/ClickHouse/ClickHouse/pull/12622) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Add sanity check for MergeTree settings. If the settings are incorrect, the server will refuse to start or to create a table, printing detailed explanation to the user. [#13153](https://github.com/ClickHouse/ClickHouse/pull/13153) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Protect from the cases when user may set `background_pool_size` to value lower than `number_of_free_entries_in_pool_to_execute_mutation` or `number_of_free_entries_in_pool_to_lower_max_size_of_merge`. In these cases ALTERs won't work or the maximum size of merge will be too limited. It will throw exception explaining what to do. This closes [#10897](https://github.com/ClickHouse/ClickHouse/issues/10897). [#12728](https://github.com/ClickHouse/ClickHouse/pull/12728) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
|
||||
#### New Feature
|
||||
|
||||
* Polygon dictionary type that provides efficient "reverse geocoding" lookups - to find the region by coordinates in a dictionary of many polygons (world map). It is using carefully optimized algorithm with recursive grids to maintain low CPU and memory usage. [#9278](https://github.com/ClickHouse/ClickHouse/pull/9278) ([achulkov2](https://github.com/achulkov2)).
|
||||
* Added support of LDAP authentication for preconfigured users ("Simple Bind" method). [#11234](https://github.com/ClickHouse/ClickHouse/pull/11234) ([Denis Glazachev](https://github.com/traceon)).
|
||||
* Introduce setting `alter_partition_verbose_result` which outputs information about touched parts for some types of `ALTER TABLE ... PARTITION ...` queries (currently `ATTACH` and `FREEZE`). Closes [#8076](https://github.com/ClickHouse/ClickHouse/issues/8076). [#13017](https://github.com/ClickHouse/ClickHouse/pull/13017) ([alesapin](https://github.com/alesapin)).
|
||||
* Add `bayesAB` function for bayesian-ab-testing. [#12327](https://github.com/ClickHouse/ClickHouse/pull/12327) ([achimbab](https://github.com/achimbab)).
|
||||
* Added `system.crash_log` table into which stack traces for fatal errors are collected. This table should be empty. [#12316](https://github.com/ClickHouse/ClickHouse/pull/12316) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Added http headers `X-ClickHouse-Database` and `X-ClickHouse-Format` which may be used to set default database and output format. [#12981](https://github.com/ClickHouse/ClickHouse/pull/12981) ([hcz](https://github.com/hczhcz)).
|
||||
* Add `minMap` and `maxMap` functions support to `SimpleAggregateFunction`. [#12662](https://github.com/ClickHouse/ClickHouse/pull/12662) ([Ildus Kurbangaliev](https://github.com/ildus)).
|
||||
* Add setting `allow_non_metadata_alters` which restricts to execute `ALTER` queries which modify data on disk. Disabled be default. Closes [#11547](https://github.com/ClickHouse/ClickHouse/issues/11547). [#12635](https://github.com/ClickHouse/ClickHouse/pull/12635) ([alesapin](https://github.com/alesapin)).
|
||||
* A function `formatRow` is added to support turning arbitrary expressions into a string via given format. It's useful for manipulating SQL outputs and is quite versatile combined with the `columns` function. [#12574](https://github.com/ClickHouse/ClickHouse/pull/12574) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Add `FROM_UNIXTIME` function for compatibility with MySQL, related to [12149](https://github.com/ClickHouse/ClickHouse/issues/12149). [#12484](https://github.com/ClickHouse/ClickHouse/pull/12484) ([flynn](https://github.com/ucasFL)).
|
||||
* Allow Nullable types as keys in MergeTree tables if `allow_nullable_key` table setting is enabled. Closes [#5319](https://github.com/ClickHouse/ClickHouse/issues/5319). [#12433](https://github.com/ClickHouse/ClickHouse/pull/12433) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Integration with [COS](https://intl.cloud.tencent.com/product/cos). [#12386](https://github.com/ClickHouse/ClickHouse/pull/12386) ([fastio](https://github.com/fastio)).
|
||||
* Add mapAdd and mapSubtract functions for adding/subtracting key-mapped values. [#11735](https://github.com/ClickHouse/ClickHouse/pull/11735) ([Ildus Kurbangaliev](https://github.com/ildus)).
|
||||
|
||||
#### Bug Fix
|
||||
|
||||
* Fix premature `ON CLUSTER` timeouts for queries that must be executed on a single replica. Fixes [#6704](https://github.com/ClickHouse/ClickHouse/issues/6704), [#7228](https://github.com/ClickHouse/ClickHouse/issues/7228), [#13361](https://github.com/ClickHouse/ClickHouse/issues/13361), [#11884](https://github.com/ClickHouse/ClickHouse/issues/11884). [#13450](https://github.com/ClickHouse/ClickHouse/pull/13450) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix crash in mark inclusion search introduced in [#12277](https://github.com/ClickHouse/ClickHouse/pull/12277). [#14225](https://github.com/ClickHouse/ClickHouse/pull/14225) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Fix race condition in external dictionaries with cache layout which can lead server crash. [#12566](https://github.com/ClickHouse/ClickHouse/pull/12566) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix visible data clobbering by progress bar in client in interactive mode. This fixes [#12562](https://github.com/ClickHouse/ClickHouse/issues/12562) and [#13369](https://github.com/ClickHouse/ClickHouse/issues/13369) and [#13584](https://github.com/ClickHouse/ClickHouse/issues/13584) and fixes [#12964](https://github.com/ClickHouse/ClickHouse/issues/12964). [#13691](https://github.com/ClickHouse/ClickHouse/pull/13691) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fixed incorrect sorting order for `LowCardinality` columns when ORDER BY multiple columns is used. This fixes [#13958](https://github.com/ClickHouse/ClickHouse/issues/13958). [#14223](https://github.com/ClickHouse/ClickHouse/pull/14223) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||
* Removed hardcoded timeout, which wrongly overruled `query_wait_timeout_milliseconds` setting for cache-dictionary. [#14105](https://github.com/ClickHouse/ClickHouse/pull/14105) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||
* Fixed wrong mount point in extra info for `Poco::Exception: no space left on device`. [#14050](https://github.com/ClickHouse/ClickHouse/pull/14050) ([tavplubix](https://github.com/tavplubix)).
|
||||
* Fix wrong query optimization of select queries with `DISTINCT` keyword when subqueries also have `DISTINCT` in case `optimize_duplicate_order_by_and_distinct` setting is enabled. [#13925](https://github.com/ClickHouse/ClickHouse/pull/13925) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fixed potential deadlock when renaming `Distributed` table. [#13922](https://github.com/ClickHouse/ClickHouse/pull/13922) ([tavplubix](https://github.com/tavplubix)).
|
||||
* Fix incorrect sorting for `FixedString` columns when ORDER BY multiple columns is used. Fixes [#13182](https://github.com/ClickHouse/ClickHouse/issues/13182). [#13887](https://github.com/ClickHouse/ClickHouse/pull/13887) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix potentially lower precision of `topK`/`topKWeighted` aggregations (with non-default parameters). [#13817](https://github.com/ClickHouse/ClickHouse/pull/13817) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix reading from MergeTree table with INDEX of type SET fails when compared against NULL. This fixes [#13686](https://github.com/ClickHouse/ClickHouse/issues/13686). [#13793](https://github.com/ClickHouse/ClickHouse/pull/13793) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Fix step overflow in function `range()`. [#13790](https://github.com/ClickHouse/ClickHouse/pull/13790) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fixed `Directory not empty` error when concurrently executing `DROP DATABASE` and `CREATE TABLE`. [#13756](https://github.com/ClickHouse/ClickHouse/pull/13756) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Add range check for `h3KRing` function. This fixes [#13633](https://github.com/ClickHouse/ClickHouse/issues/13633). [#13752](https://github.com/ClickHouse/ClickHouse/pull/13752) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix race condition between DETACH and background merges. Parts may revive after detach. This is continuation of [#8602](https://github.com/ClickHouse/ClickHouse/issues/8602) that did not fix the issue but introduced a test that started to fail in very rare cases, demonstrating the issue. [#13746](https://github.com/ClickHouse/ClickHouse/pull/13746) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix logging Settings.Names/Values when `log_queries_min_type` greater than `QUERY_START`. [#13737](https://github.com/ClickHouse/ClickHouse/pull/13737) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix incorrect message in `clickhouse-server.init` while checking user and group. [#13711](https://github.com/ClickHouse/ClickHouse/pull/13711) ([ylchou](https://github.com/ylchou)).
|
||||
* Do not optimize `any(arrayJoin())` to `arrayJoin()` under `optimize_move_functions_out_of_any`. [#13681](https://github.com/ClickHouse/ClickHouse/pull/13681) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fixed possible deadlock in concurrent `ALTER ... REPLACE/MOVE PARTITION ...` queries. [#13626](https://github.com/ClickHouse/ClickHouse/pull/13626) ([tavplubix](https://github.com/tavplubix)).
|
||||
* Fixed the behaviour when sometimes cache-dictionary returned default value instead of present value from source. [#13624](https://github.com/ClickHouse/ClickHouse/pull/13624) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||
* Fix secondary indices corruption in compact parts (compact parts is an experimental feature). [#13538](https://github.com/ClickHouse/ClickHouse/pull/13538) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix wrong code in function `netloc`. This fixes [#13335](https://github.com/ClickHouse/ClickHouse/issues/13335). [#13446](https://github.com/ClickHouse/ClickHouse/pull/13446) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix error in `parseDateTimeBestEffort` function when unix timestamp was passed as an argument. This fixes [#13362](https://github.com/ClickHouse/ClickHouse/issues/13362). [#13441](https://github.com/ClickHouse/ClickHouse/pull/13441) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix invalid return type for comparison of tuples with `NULL` elements. Fixes [#12461](https://github.com/ClickHouse/ClickHouse/issues/12461). [#13420](https://github.com/ClickHouse/ClickHouse/pull/13420) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix wrong optimization caused `aggregate function any(x) is found inside another aggregate function in query` error with `SET optimize_move_functions_out_of_any = 1` and aliases inside `any()`. [#13419](https://github.com/ClickHouse/ClickHouse/pull/13419) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fix possible race in `StorageMemory`. [#13416](https://github.com/ClickHouse/ClickHouse/pull/13416) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix empty output for `Arrow` and `Parquet` formats in case if query return zero rows. It was done because empty output is not valid for this formats. [#13399](https://github.com/ClickHouse/ClickHouse/pull/13399) ([hcz](https://github.com/hczhcz)).
|
||||
* Fix select queries with constant columns and prefix of primary key in `ORDER BY` clause. [#13396](https://github.com/ClickHouse/ClickHouse/pull/13396) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix `PrettyCompactMonoBlock` for clickhouse-local. Fix extremes/totals with `PrettyCompactMonoBlock`. Fixes [#7746](https://github.com/ClickHouse/ClickHouse/issues/7746). [#13394](https://github.com/ClickHouse/ClickHouse/pull/13394) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fixed deadlock in system.text_log. [#12452](https://github.com/ClickHouse/ClickHouse/pull/12452) ([alexey-milovidov](https://github.com/alexey-milovidov)). It is a part of [#12339](https://github.com/ClickHouse/ClickHouse/issues/12339). This fixes [#12325](https://github.com/ClickHouse/ClickHouse/issues/12325). [#13386](https://github.com/ClickHouse/ClickHouse/pull/13386) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||
* Fixed `File(TSVWithNames*)` (header was written multiple times), fixed `clickhouse-local --format CSVWithNames*` (lacks header, broken after [#12197](https://github.com/ClickHouse/ClickHouse/issues/12197)), fixed `clickhouse-local --format CSVWithNames*` with zero rows (lacks header). [#13343](https://github.com/ClickHouse/ClickHouse/pull/13343) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix segfault when function `groupArrayMovingSum` deserializes empty state. Fixes [#13339](https://github.com/ClickHouse/ClickHouse/issues/13339). [#13341](https://github.com/ClickHouse/ClickHouse/pull/13341) ([alesapin](https://github.com/alesapin)).
|
||||
* Throw error on `arrayJoin()` function in `JOIN ON` section. [#13330](https://github.com/ClickHouse/ClickHouse/pull/13330) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fix crash in `LEFT ASOF JOIN` with `join_use_nulls=1`. [#13291](https://github.com/ClickHouse/ClickHouse/pull/13291) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fix possible error `Totals having transform was already added to pipeline` in case of a query from delayed replica. [#13290](https://github.com/ClickHouse/ClickHouse/pull/13290) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* The server may crash if user passed specifically crafted arguments to the function `h3ToChildren`. This fixes [#13275](https://github.com/ClickHouse/ClickHouse/issues/13275). [#13277](https://github.com/ClickHouse/ClickHouse/pull/13277) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix potentially low performance and slightly incorrect result for `uniqExact`, `topK`, `sumDistinct` and similar aggregate functions called on Float types with `NaN` values. It also triggered assert in debug build. This fixes [#12491](https://github.com/ClickHouse/ClickHouse/issues/12491). [#13254](https://github.com/ClickHouse/ClickHouse/pull/13254) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix assertion in KeyCondition when primary key contains expression with monotonic function and query contains comparison with constant whose type is different. This fixes [#12465](https://github.com/ClickHouse/ClickHouse/issues/12465). [#13251](https://github.com/ClickHouse/ClickHouse/pull/13251) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Return passed number for numbers with MSB set in function roundUpToPowerOfTwoOrZero(). It prevents potential errors in case of overflow of array sizes. [#13234](https://github.com/ClickHouse/ClickHouse/pull/13234) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix function if with nullable constexpr as cond that is not literal NULL. Fixes [#12463](https://github.com/ClickHouse/ClickHouse/issues/12463). [#13226](https://github.com/ClickHouse/ClickHouse/pull/13226) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix assert in `arrayElement` function in case of array elements are Nullable and array subscript is also Nullable. This fixes [#12172](https://github.com/ClickHouse/ClickHouse/issues/12172). [#13224](https://github.com/ClickHouse/ClickHouse/pull/13224) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix DateTime64 conversion functions with constant argument. [#13205](https://github.com/ClickHouse/ClickHouse/pull/13205) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix parsing row policies from users.xml when names of databases or tables contain dots. This fixes [#5779](https://github.com/ClickHouse/ClickHouse/issues/5779), [#12527](https://github.com/ClickHouse/ClickHouse/issues/12527). [#13199](https://github.com/ClickHouse/ClickHouse/pull/13199) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||
* Fix access to `redis` dictionary after connection was dropped once. It may happen with `cache` and `direct` dictionary layouts. [#13082](https://github.com/ClickHouse/ClickHouse/pull/13082) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix wrong index analysis with functions. It could lead to some data parts being skipped when reading from `MergeTree` tables. Fixes [#13060](https://github.com/ClickHouse/ClickHouse/issues/13060). Fixes [#12406](https://github.com/ClickHouse/ClickHouse/issues/12406). [#13081](https://github.com/ClickHouse/ClickHouse/pull/13081) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix error `Cannot convert column because it is constant but values of constants are different in source and result` for remote queries which use deterministic functions in scope of query, but not deterministic between queries, like `now()`, `now64()`, `randConstant()`. Fixes [#11327](https://github.com/ClickHouse/ClickHouse/issues/11327). [#13075](https://github.com/ClickHouse/ClickHouse/pull/13075) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix crash which was possible for queries with `ORDER BY` tuple and small `LIMIT`. Fixes [#12623](https://github.com/ClickHouse/ClickHouse/issues/12623). [#13009](https://github.com/ClickHouse/ClickHouse/pull/13009) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix `Block structure mismatch` error for queries with `UNION` and `JOIN`. Fixes [#12602](https://github.com/ClickHouse/ClickHouse/issues/12602). [#12989](https://github.com/ClickHouse/ClickHouse/pull/12989) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Corrected `merge_with_ttl_timeout` logic which did not work well when expiration affected more than one partition over one time interval. (Authored by @excitoon). [#12982](https://github.com/ClickHouse/ClickHouse/pull/12982) ([Alexander Kazakov](https://github.com/Akazz)).
|
||||
* Fix columns duplication for range hashed dictionary created from DDL query. This fixes [#10605](https://github.com/ClickHouse/ClickHouse/issues/10605). [#12857](https://github.com/ClickHouse/ClickHouse/pull/12857) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix unnecessary limiting for the number of threads for selects from local replica. [#12840](https://github.com/ClickHouse/ClickHouse/pull/12840) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix rare bug when `ALTER DELETE` and `ALTER MODIFY COLUMN` queries executed simultaneously as a single mutation. Bug leads to an incorrect amount of rows in `count.txt` and as a consequence incorrect data in part. Also, fix a small bug with simultaneous `ALTER RENAME COLUMN` and `ALTER ADD COLUMN`. [#12760](https://github.com/ClickHouse/ClickHouse/pull/12760) ([alesapin](https://github.com/alesapin)).
|
||||
* Wrong credentials being used when using `clickhouse` dictionary source to query remote tables. [#12756](https://github.com/ClickHouse/ClickHouse/pull/12756) ([sundyli](https://github.com/sundy-li)).
|
||||
* Fix `CAST(Nullable(String), Enum())`. [#12745](https://github.com/ClickHouse/ClickHouse/pull/12745) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix performance with large tuples, which are interpreted as functions in `IN` section. The case when user writes `WHERE x IN tuple(1, 2, ...)` instead of `WHERE x IN (1, 2, ...)` for some obscure reason. [#12700](https://github.com/ClickHouse/ClickHouse/pull/12700) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix memory tracking for input_format_parallel_parsing (by attaching thread to group). [#12672](https://github.com/ClickHouse/ClickHouse/pull/12672) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Fix wrong optimization `optimize_move_functions_out_of_any=1` in case of `any(func(<lambda>))`. [#12664](https://github.com/ClickHouse/ClickHouse/pull/12664) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fixed [#10572](https://github.com/ClickHouse/ClickHouse/issues/10572) fix bloom filter index with const expression. [#12659](https://github.com/ClickHouse/ClickHouse/pull/12659) ([Winter Zhang](https://github.com/zhang2014)).
|
||||
* Fix SIGSEGV in StorageKafka when broker is unavailable (and not only). [#12658](https://github.com/ClickHouse/ClickHouse/pull/12658) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Add support for function `if` with `Array(UUID)` arguments. This fixes [#11066](https://github.com/ClickHouse/ClickHouse/issues/11066). [#12648](https://github.com/ClickHouse/ClickHouse/pull/12648) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* CREATE USER IF NOT EXISTS now doesn't throw exception if the user exists. This fixes [#12507](https://github.com/ClickHouse/ClickHouse/issues/12507). [#12646](https://github.com/ClickHouse/ClickHouse/pull/12646) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||
* Exception `There is no supertype...` can be thrown during `ALTER ... UPDATE` in unexpected cases (e.g. when subtracting from UInt64 column). This fixes [#7306](https://github.com/ClickHouse/ClickHouse/issues/7306). This fixes [#4165](https://github.com/ClickHouse/ClickHouse/issues/4165). [#12633](https://github.com/ClickHouse/ClickHouse/pull/12633) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix possible `Pipeline stuck` error for queries with external sorting. Fixes [#12617](https://github.com/ClickHouse/ClickHouse/issues/12617). [#12618](https://github.com/ClickHouse/ClickHouse/pull/12618) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix error `Output of TreeExecutor is not sorted` for `OPTIMIZE DEDUPLICATE`. Fixes [#11572](https://github.com/ClickHouse/ClickHouse/issues/11572). [#12613](https://github.com/ClickHouse/ClickHouse/pull/12613) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix the issue when alias on result of function `any` can be lost during query optimization. [#12593](https://github.com/ClickHouse/ClickHouse/pull/12593) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Remove data for Distributed tables (blocks from async INSERTs) on DROP TABLE. [#12556](https://github.com/ClickHouse/ClickHouse/pull/12556) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* Now ClickHouse will recalculate checksums for parts when file `checksums.txt` is absent. Broken since [#9827](https://github.com/ClickHouse/ClickHouse/issues/9827). [#12545](https://github.com/ClickHouse/ClickHouse/pull/12545) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix bug which lead to broken old parts after `ALTER DELETE` query when `enable_mixed_granularity_parts=1`. Fixes [#12536](https://github.com/ClickHouse/ClickHouse/issues/12536). [#12543](https://github.com/ClickHouse/ClickHouse/pull/12543) ([alesapin](https://github.com/alesapin)).
|
||||
* Fixing race condition in live view tables which could cause data duplication. LIVE VIEW is an experimental feature. [#12519](https://github.com/ClickHouse/ClickHouse/pull/12519) ([vzakaznikov](https://github.com/vzakaznikov)).
|
||||
* Fix backwards compatibility in binary format of `AggregateFunction(avg, ...)` values. This fixes [#12342](https://github.com/ClickHouse/ClickHouse/issues/12342). [#12486](https://github.com/ClickHouse/ClickHouse/pull/12486) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix crash in JOIN with dictionary when we are joining over expression of dictionary key: `t JOIN dict ON expr(dict.id) = t.id`. Disable dictionary join optimisation for this case. [#12458](https://github.com/ClickHouse/ClickHouse/pull/12458) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Fix overflow when very large LIMIT or OFFSET is specified. This fixes [#10470](https://github.com/ClickHouse/ClickHouse/issues/10470). This fixes [#11372](https://github.com/ClickHouse/ClickHouse/issues/11372). [#12427](https://github.com/ClickHouse/ClickHouse/pull/12427) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* kafka: fix SIGSEGV if there is a message with error in the middle of the batch. [#12302](https://github.com/ClickHouse/ClickHouse/pull/12302) ([Azat Khuzhin](https://github.com/azat)).
|
||||
|
||||
#### Improvement
|
||||
|
||||
* Keep smaller amount of logs in ZooKeeper. Avoid excessive growing of ZooKeeper nodes in case of offline replicas when having many servers/tables/inserts. [#13100](https://github.com/ClickHouse/ClickHouse/pull/13100) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Now exceptions forwarded to the client if an error happened during ALTER or mutation. Closes [#11329](https://github.com/ClickHouse/ClickHouse/issues/11329). [#12666](https://github.com/ClickHouse/ClickHouse/pull/12666) ([alesapin](https://github.com/alesapin)).
|
||||
* Add `QueryTimeMicroseconds`, `SelectQueryTimeMicroseconds` and `InsertQueryTimeMicroseconds` to `system.events`, along with system.metrics, processes, query_log, etc. [#13028](https://github.com/ClickHouse/ClickHouse/pull/13028) ([ianton-ru](https://github.com/ianton-ru)).
|
||||
* Added `SelectedRows` and `SelectedBytes` to `system.events`, along with system.metrics, processes, query_log, etc. [#12638](https://github.com/ClickHouse/ClickHouse/pull/12638) ([ianton-ru](https://github.com/ianton-ru)).
|
||||
* Added `current_database` information to `system.query_log`. [#12652](https://github.com/ClickHouse/ClickHouse/pull/12652) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Allow `TabSeparatedRaw` as input format. [#12009](https://github.com/ClickHouse/ClickHouse/pull/12009) ([hcz](https://github.com/hczhcz)).
|
||||
* Now `joinGet` supports multi-key lookup. [#12418](https://github.com/ClickHouse/ClickHouse/pull/12418) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Allow `*Map` aggregate functions to work on Arrays with NULLs. Fixes [#13157](https://github.com/ClickHouse/ClickHouse/issues/13157). [#13225](https://github.com/ClickHouse/ClickHouse/pull/13225) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Avoid overflow in parsing of DateTime values that will lead to negative unix timestamp in their timezone (for example, `1970-01-01 00:00:00` in Moscow). Saturate to zero instead. This fixes [#3470](https://github.com/ClickHouse/ClickHouse/issues/3470). This fixes [#4172](https://github.com/ClickHouse/ClickHouse/issues/4172). [#12443](https://github.com/ClickHouse/ClickHouse/pull/12443) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* AvroConfluent: Skip Kafka tombstone records - Support skipping broken records [#13203](https://github.com/ClickHouse/ClickHouse/pull/13203) ([Andrew Onyshchuk](https://github.com/oandrew)).
|
||||
* Fix wrong error for long queries. It was possible to get syntax error other than `Max query size exceeded` for correct query. [#13928](https://github.com/ClickHouse/ClickHouse/pull/13928) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix data race in `lgamma` function. This race was caught only in `tsan`, no side effects really happened. [#13842](https://github.com/ClickHouse/ClickHouse/pull/13842) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Fix a 'Week'-interval formatting for ATTACH/ALTER/CREATE QUOTA-statements. [#13417](https://github.com/ClickHouse/ClickHouse/pull/13417) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)).
|
||||
* Now broken parts are also reported when encountered in compact part processing. Compact parts is an experimental feature. [#13282](https://github.com/ClickHouse/ClickHouse/pull/13282) ([Amos Bird](https://github.com/amosbird)).
|
||||
* Fix assert in `geohashesInBox`. This fixes [#12554](https://github.com/ClickHouse/ClickHouse/issues/12554). [#13229](https://github.com/ClickHouse/ClickHouse/pull/13229) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix assert in `parseDateTimeBestEffort`. This fixes [#12649](https://github.com/ClickHouse/ClickHouse/issues/12649). [#13227](https://github.com/ClickHouse/ClickHouse/pull/13227) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Minor optimization in Processors/PipelineExecutor: breaking out of a loop because it makes sense to do so. [#13058](https://github.com/ClickHouse/ClickHouse/pull/13058) ([Mark Papadakis](https://github.com/markpapadakis)).
|
||||
* Support TRUNCATE table without TABLE keyword. [#12653](https://github.com/ClickHouse/ClickHouse/pull/12653) ([Winter Zhang](https://github.com/zhang2014)).
|
||||
* Fix explain query format overwrite by default. This fixes [#12541](https://github.com/ClickHouse/ClickHouse/issues/12432). [#12541](https://github.com/ClickHouse/ClickHouse/pull/12541) ([BohuTANG](https://github.com/BohuTANG)).
|
||||
* Allow to set JOIN kind and type in more standad way: `LEFT SEMI JOIN` instead of `SEMI LEFT JOIN`. For now both are correct. [#12520](https://github.com/ClickHouse/ClickHouse/pull/12520) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Changes default value for `multiple_joins_rewriter_version` to 2. It enables new multiple joins rewriter that knows about column names. [#12469](https://github.com/ClickHouse/ClickHouse/pull/12469) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Add several metrics for requests to S3 storages. [#12464](https://github.com/ClickHouse/ClickHouse/pull/12464) ([ianton-ru](https://github.com/ianton-ru)).
|
||||
* Use correct default secure port for clickhouse-benchmark with `--secure` argument. This fixes [#11044](https://github.com/ClickHouse/ClickHouse/issues/11044). [#12440](https://github.com/ClickHouse/ClickHouse/pull/12440) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Rollback insertion errors in `Log`, `TinyLog`, `StripeLog` engines. In previous versions insertion error lead to inconsisent table state (this works as documented and it is normal for these table engines). This fixes [#12402](https://github.com/ClickHouse/ClickHouse/issues/12402). [#12426](https://github.com/ClickHouse/ClickHouse/pull/12426) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Implement `RENAME DATABASE` and `RENAME DICTIONARY` for `Atomic` database engine - Add implicit `{uuid}` macro, which can be used in ZooKeeper path for `ReplicatedMergeTree`. It works with `CREATE ... ON CLUSTER ...` queries. Set `show_table_uuid_in_table_create_query_if_not_nil` to `true` to use it. - Make `ReplicatedMergeTree` engine arguments optional, `/clickhouse/tables/{uuid}/{shard}/` and `{replica}` are used by default. Closes [#12135](https://github.com/ClickHouse/ClickHouse/issues/12135). - Minor fixes. - These changes break backward compatibility of `Atomic` database engine. Previously created `Atomic` databases must be manually converted to new format. Atomic database is an experimental feature. [#12343](https://github.com/ClickHouse/ClickHouse/pull/12343) ([tavplubix](https://github.com/tavplubix)).
|
||||
* Separated `AWSAuthV4Signer` into different logger, removed excessive `AWSClient: AWSClient` from log messages. [#12320](https://github.com/ClickHouse/ClickHouse/pull/12320) ([Vladimir Chebotarev](https://github.com/excitoon)).
|
||||
* Better exception message in disk access storage. [#12625](https://github.com/ClickHouse/ClickHouse/pull/12625) ([alesapin](https://github.com/alesapin)).
|
||||
* Better exception for function `in` with invalid number of arguments. [#12529](https://github.com/ClickHouse/ClickHouse/pull/12529) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Fix error message about adaptive granularity. [#12624](https://github.com/ClickHouse/ClickHouse/pull/12624) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix SETTINGS parse after FORMAT. [#12480](https://github.com/ClickHouse/ClickHouse/pull/12480) ([Azat Khuzhin](https://github.com/azat)).
|
||||
* If MergeTree table does not contain ORDER BY or PARTITION BY, it was possible to request ALTER to CLEAR all the columns and ALTER will stuck. Fixed [#7941](https://github.com/ClickHouse/ClickHouse/issues/7941). [#12382](https://github.com/ClickHouse/ClickHouse/pull/12382) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Avoid re-loading completion from the history file after each query (to avoid history overlaps with other client sessions). [#13086](https://github.com/ClickHouse/ClickHouse/pull/13086) ([Azat Khuzhin](https://github.com/azat)).
|
||||
|
||||
#### Performance Improvement
|
||||
|
||||
* Lower memory usage for some operations up to 2 times. [#12424](https://github.com/ClickHouse/ClickHouse/pull/12424) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Optimize PK lookup for queries that match exact PK range. [#12277](https://github.com/ClickHouse/ClickHouse/pull/12277) ([Ivan Babrou](https://github.com/bobrik)).
|
||||
* Slightly optimize very short queries with `LowCardinality`. [#14129](https://github.com/ClickHouse/ClickHouse/pull/14129) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Slightly improve performance of aggregation by UInt8/UInt16 keys. [#13091](https://github.com/ClickHouse/ClickHouse/pull/13091) and [#13055](https://github.com/ClickHouse/ClickHouse/pull/13055) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Push down `LIMIT` step for query plan (inside subqueries). [#13016](https://github.com/ClickHouse/ClickHouse/pull/13016) ([Nikolai Kochetov](https://github.com/KochetovNicolai)).
|
||||
* Parallel primary key lookup and skipping index stages on parts, as described in [#11564](https://github.com/ClickHouse/ClickHouse/issues/11564). [#12589](https://github.com/ClickHouse/ClickHouse/pull/12589) ([Ivan Babrou](https://github.com/bobrik)).
|
||||
* Converting String-type arguments of function "if" and "transform" into enum if `set optimize_if_transform_strings_to_enum = 1`. [#12515](https://github.com/ClickHouse/ClickHouse/pull/12515) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Replaces monotonic functions with its argument in `ORDER BY` if `set optimize_monotonous_functions_in_order_by=1`. [#12467](https://github.com/ClickHouse/ClickHouse/pull/12467) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Add order by optimization that rewrites `ORDER BY x, f(x)` with `ORDER by x` if `set optimize_redundant_functions_in_order_by = 1`. [#12404](https://github.com/ClickHouse/ClickHouse/pull/12404) ([Artem Zuikov](https://github.com/4ertus2)).
|
||||
* Allow pushdown predicate when subquery contains `WITH` clause. This fixes [#12293](https://github.com/ClickHouse/ClickHouse/issues/12293) [#12663](https://github.com/ClickHouse/ClickHouse/pull/12663) ([Winter Zhang](https://github.com/zhang2014)).
|
||||
* Improve performance of reading from compact parts. Compact parts is an experimental feature. [#12492](https://github.com/ClickHouse/ClickHouse/pull/12492) ([Anton Popov](https://github.com/CurtizJ)).
|
||||
* Attempt to implement streaming optimization in `DiskS3`. DiskS3 is an experimental feature. [#12434](https://github.com/ClickHouse/ClickHouse/pull/12434) ([Vladimir Chebotarev](https://github.com/excitoon)).
|
||||
|
||||
#### Build/Testing/Packaging Improvement
|
||||
|
||||
* Use `shellcheck` for sh tests linting. [#13200](https://github.com/ClickHouse/ClickHouse/pull/13200) [#13207](https://github.com/ClickHouse/ClickHouse/pull/13207) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Add script which set labels for pull requests in GitHub hook. [#13183](https://github.com/ClickHouse/ClickHouse/pull/13183) ([alesapin](https://github.com/alesapin)).
|
||||
* Remove some of recursive submodules. See [#13378](https://github.com/ClickHouse/ClickHouse/issues/13378). [#13379](https://github.com/ClickHouse/ClickHouse/pull/13379) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Ensure that all the submodules are from proper URLs. Continuation of [#13379](https://github.com/ClickHouse/ClickHouse/issues/13379). This fixes [#13378](https://github.com/ClickHouse/ClickHouse/issues/13378). [#13397](https://github.com/ClickHouse/ClickHouse/pull/13397) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Added support for user-declared settings, which can be accessed from inside queries. This is needed when ClickHouse engine is used as a component of another system. [#13013](https://github.com/ClickHouse/ClickHouse/pull/13013) ([Vitaly Baranov](https://github.com/vitlibar)).
|
||||
* Added testing for RBAC functionality of INSERT privilege in TestFlows. Expanded tables on which SELECT is being tested. Added Requirements to match new table engine tests. [#13340](https://github.com/ClickHouse/ClickHouse/pull/13340) ([MyroTk](https://github.com/MyroTk)).
|
||||
* Fix timeout error during server restart in the stress test. [#13321](https://github.com/ClickHouse/ClickHouse/pull/13321) ([alesapin](https://github.com/alesapin)).
|
||||
* Now fast test will wait server with retries. [#13284](https://github.com/ClickHouse/ClickHouse/pull/13284) ([alesapin](https://github.com/alesapin)).
|
||||
* Function `materialize()` (the function for ClickHouse testing) will work for NULL as expected - by transforming it to non-constant column. [#13212](https://github.com/ClickHouse/ClickHouse/pull/13212) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix libunwind build in AArch64. This fixes [#13204](https://github.com/ClickHouse/ClickHouse/issues/13204). [#13208](https://github.com/ClickHouse/ClickHouse/pull/13208) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Even more retries in zkutil gtest to prevent test flakiness. [#13165](https://github.com/ClickHouse/ClickHouse/pull/13165) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Small fixes to the RBAC TestFlows. [#13152](https://github.com/ClickHouse/ClickHouse/pull/13152) ([vzakaznikov](https://github.com/vzakaznikov)).
|
||||
* Fixing `00960_live_view_watch_events_live.py` test. [#13108](https://github.com/ClickHouse/ClickHouse/pull/13108) ([vzakaznikov](https://github.com/vzakaznikov)).
|
||||
* Improve cache purge in documentation deploy script. [#13107](https://github.com/ClickHouse/ClickHouse/pull/13107) ([alesapin](https://github.com/alesapin)).
|
||||
* Rewrote some orphan tests to gtest. Removed useless includes from tests. [#13073](https://github.com/ClickHouse/ClickHouse/pull/13073) ([Nikita Mikhaylov](https://github.com/nikitamikhaylov)).
|
||||
* Added tests for RBAC functionality of `SELECT` privilege in TestFlows. [#13061](https://github.com/ClickHouse/ClickHouse/pull/13061) ([Ritaank Tiwari](https://github.com/ritaank)).
|
||||
* Rerun some tests in fast test check. [#12992](https://github.com/ClickHouse/ClickHouse/pull/12992) ([alesapin](https://github.com/alesapin)).
|
||||
* Fix MSan error in "rdkafka" library. This closes [#12990](https://github.com/ClickHouse/ClickHouse/issues/12990). Updated `rdkafka` to version 1.5 (master). [#12991](https://github.com/ClickHouse/ClickHouse/pull/12991) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix UBSan report in base64 if tests were run on server with AVX-512. This fixes [#12318](https://github.com/ClickHouse/ClickHouse/issues/12318). Author: @qoega. [#12441](https://github.com/ClickHouse/ClickHouse/pull/12441) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Fix UBSan report in HDFS library. This closes [#12330](https://github.com/ClickHouse/ClickHouse/issues/12330). [#12453](https://github.com/ClickHouse/ClickHouse/pull/12453) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Check an ability that we able to restore the backup from an old version to the new version. This closes [#8979](https://github.com/ClickHouse/ClickHouse/issues/8979). [#12959](https://github.com/ClickHouse/ClickHouse/pull/12959) ([alesapin](https://github.com/alesapin)).
|
||||
* Do not build helper_container image inside integrational tests. Build docker container in CI and use pre-built helper_container in integration tests. [#12953](https://github.com/ClickHouse/ClickHouse/pull/12953) ([Ilya Yatsishin](https://github.com/qoega)).
|
||||
* Add a test for `ALTER TABLE CLEAR COLUMN` query for primary key columns. [#12951](https://github.com/ClickHouse/ClickHouse/pull/12951) ([alesapin](https://github.com/alesapin)).
|
||||
* Increased timeouts in testflows tests. [#12949](https://github.com/ClickHouse/ClickHouse/pull/12949) ([vzakaznikov](https://github.com/vzakaznikov)).
|
||||
* Fix build of test under Mac OS X. This closes [#12767](https://github.com/ClickHouse/ClickHouse/issues/12767). [#12772](https://github.com/ClickHouse/ClickHouse/pull/12772) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Connector-ODBC updated to mysql-connector-odbc-8.0.21. [#12739](https://github.com/ClickHouse/ClickHouse/pull/12739) ([Ilya Yatsishin](https://github.com/qoega)).
|
||||
* Adding RBAC syntax tests in TestFlows. [#12642](https://github.com/ClickHouse/ClickHouse/pull/12642) ([vzakaznikov](https://github.com/vzakaznikov)).
|
||||
* Improve performance of TestKeeper. This will speedup tests with heavy usage of Replicated tables. [#12505](https://github.com/ClickHouse/ClickHouse/pull/12505) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Now we check that server is able to start after stress tests run. This fixes [#12473](https://github.com/ClickHouse/ClickHouse/issues/12473). [#12496](https://github.com/ClickHouse/ClickHouse/pull/12496) ([alesapin](https://github.com/alesapin)).
|
||||
* Update fmtlib to master (7.0.1). [#12446](https://github.com/ClickHouse/ClickHouse/pull/12446) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Add docker image for fast tests. [#12294](https://github.com/ClickHouse/ClickHouse/pull/12294) ([alesapin](https://github.com/alesapin)).
|
||||
* Rework configuration paths for integration tests. [#12285](https://github.com/ClickHouse/ClickHouse/pull/12285) ([Ilya Yatsishin](https://github.com/qoega)).
|
||||
* Add compiler option to control that stack frames are not too large. This will help to run the code in fibers with small stack size. [#11524](https://github.com/ClickHouse/ClickHouse/pull/11524) ([alexey-milovidov](https://github.com/alexey-milovidov)).
|
||||
* Update gitignore-files. [#13447](https://github.com/ClickHouse/ClickHouse/pull/13447) ([vladimir-golovchenko](https://github.com/vladimir-golovchenko)).
|
||||
|
||||
|
||||
## ClickHouse release 20.6
|
||||
|
||||
### ClickHouse release v20.6.3.28-stable
|
||||
|
|
|
@ -28,6 +28,16 @@ endforeach()
|
|||
|
||||
project(ClickHouse)
|
||||
|
||||
option(FAIL_ON_UNSUPPORTED_OPTIONS_COMBINATION
|
||||
"Stop/Fail CMake configuration if some ENABLE_XXX option is defined (either ON or OFF) but is not possible to satisfy"
|
||||
ON
|
||||
)
|
||||
if(FAIL_ON_UNSUPPORTED_OPTIONS_COMBINATION)
|
||||
set(RECONFIGURE_MESSAGE_LEVEL FATAL_ERROR)
|
||||
else()
|
||||
set(RECONFIGURE_MESSAGE_LEVEL STATUS)
|
||||
endif()
|
||||
|
||||
include (cmake/arch.cmake)
|
||||
include (cmake/target.cmake)
|
||||
include (cmake/tools.cmake)
|
||||
|
@ -57,7 +67,7 @@ if(ENABLE_IPO)
|
|||
message(STATUS "IPO/LTO is supported, enabling")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(STATUS "IPO/LTO is not supported: <${IPO_NOT_SUPPORTED}>")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "IPO/LTO is not supported: <${IPO_NOT_SUPPORTED}>")
|
||||
endif()
|
||||
else()
|
||||
message(STATUS "IPO/LTO not enabled.")
|
||||
|
@ -133,6 +143,8 @@ option (ENABLE_TESTS "Enables tests" ON)
|
|||
|
||||
if (OS_LINUX AND NOT UNBUNDLED AND MAKE_STATIC_LIBRARIES AND NOT SPLIT_SHARED_LIBRARIES AND CMAKE_VERSION VERSION_GREATER "3.9.0")
|
||||
option (GLIBC_COMPATIBILITY "Set to TRUE to enable compatibility with older glibc libraries. Only for x86_64, Linux. Implies ENABLE_FASTMEMCPY." ON)
|
||||
elseif(GLIBC_COMPATIBILITY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Glibc compatibility cannot be enabled in current configuration")
|
||||
endif ()
|
||||
|
||||
if (NOT CMAKE_VERSION VERSION_GREATER "3.9.0")
|
||||
|
@ -202,9 +214,16 @@ if (ARCH_NATIVE)
|
|||
set (COMPILER_FLAGS "${COMPILER_FLAGS} -march=native")
|
||||
endif ()
|
||||
|
||||
# cmake < 3.12 doesn't supoprt 20. We'll set CMAKE_CXX_FLAGS for now
|
||||
if (UNBUNDLED AND (COMPILER_GCC OR COMPILER_CLANG))
|
||||
# to make numeric_limits<__int128> works for unbundled build
|
||||
set (_CXX_STANDARD "-std=gnu++2a")
|
||||
else()
|
||||
set (_CXX_STANDARD "-std=c++2a")
|
||||
endif()
|
||||
# cmake < 3.12 doesn't support 20. We'll set CMAKE_CXX_FLAGS for now
|
||||
# set (CMAKE_CXX_STANDARD 20)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++2a")
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${_CXX_STANDARD}")
|
||||
|
||||
set (CMAKE_CXX_EXTENSIONS 0) # https://cmake.org/cmake/help/latest/prop_tgt/CXX_EXTENSIONS.html#prop_tgt:CXX_EXTENSIONS
|
||||
set (CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
|
||||
|
@ -246,7 +265,9 @@ if (COMPILER_CLANG)
|
|||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fdiagnostics-absolute-paths")
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fdiagnostics-absolute-paths")
|
||||
|
||||
option(ENABLE_THINLTO "Enable Thin LTO. Only applicable for clang. It's also suppressed when building with tests or sanitizers." ON)
|
||||
if (NOT ENABLE_TESTS AND NOT SANITIZE)
|
||||
option(ENABLE_THINLTO "Enable Thin LTO. Only applicable for clang. It's also suppressed when building with tests or sanitizers." ON)
|
||||
endif()
|
||||
|
||||
# We cannot afford to use LTO when compiling unitests, and it's not enough
|
||||
# to only supply -fno-lto at the final linking stage. So we disable it
|
||||
|
@ -256,6 +277,8 @@ if (COMPILER_CLANG)
|
|||
set (CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} -flto=thin")
|
||||
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -flto=thin")
|
||||
set (CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO} -flto=thin")
|
||||
elseif (ENABLE_THINLTO)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable ThinLTO")
|
||||
endif ()
|
||||
|
||||
# Always prefer llvm tools when using clang. For instance, we cannot use GNU ar when llvm LTO is enabled
|
||||
|
@ -275,6 +298,8 @@ if (COMPILER_CLANG)
|
|||
else ()
|
||||
message(WARNING "Cannot find llvm-ranlib. System ranlib will be used instead. It does not work with ThinLTO.")
|
||||
endif ()
|
||||
elseif (ENABLE_THINLTO)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "ThinLTO is only available with CLang")
|
||||
endif ()
|
||||
|
||||
option (ENABLE_LIBRARIES "Enable all libraries (Global default switch)" ON)
|
||||
|
@ -371,11 +396,14 @@ include (cmake/find/ltdl.cmake) # for odbc
|
|||
# openssl, zlib before poco
|
||||
include (cmake/find/sparsehash.cmake)
|
||||
include (cmake/find/re2.cmake)
|
||||
include (cmake/find/krb5.cmake)
|
||||
include (cmake/find/libgsasl.cmake)
|
||||
include (cmake/find/cyrus-sasl.cmake)
|
||||
include (cmake/find/rdkafka.cmake)
|
||||
include (cmake/find/amqpcpp.cmake)
|
||||
include (cmake/find/capnp.cmake)
|
||||
include (cmake/find/llvm.cmake)
|
||||
include (cmake/find/termcap.cmake) # for external static llvm
|
||||
include (cmake/find/opencl.cmake)
|
||||
include (cmake/find/h3.cmake)
|
||||
include (cmake/find/libxml2.cmake)
|
||||
|
@ -384,21 +412,33 @@ include (cmake/find/protobuf.cmake)
|
|||
include (cmake/find/grpc.cmake)
|
||||
include (cmake/find/pdqsort.cmake)
|
||||
include (cmake/find/hdfs3.cmake) # uses protobuf
|
||||
include (cmake/find/poco.cmake)
|
||||
include (cmake/find/curl.cmake)
|
||||
include (cmake/find/s3.cmake)
|
||||
include (cmake/find/base64.cmake)
|
||||
include (cmake/find/parquet.cmake)
|
||||
include (cmake/find/simdjson.cmake)
|
||||
include (cmake/find/rapidjson.cmake)
|
||||
include (cmake/find/fastops.cmake)
|
||||
include (cmake/find/odbc.cmake)
|
||||
|
||||
if(NOT USE_INTERNAL_PARQUET_LIBRARY)
|
||||
set (ENABLE_ORC OFF CACHE INTERNAL "")
|
||||
endif()
|
||||
include (cmake/find/orc.cmake)
|
||||
|
||||
include (cmake/find/avro.cmake)
|
||||
include (cmake/find/msgpack.cmake)
|
||||
include (cmake/find/cassandra.cmake)
|
||||
include (cmake/find/sentry.cmake)
|
||||
include (cmake/find/stats.cmake)
|
||||
|
||||
set (USE_INTERNAL_CITYHASH_LIBRARY ON CACHE INTERNAL "")
|
||||
find_contrib_lib(cityhash)
|
||||
|
||||
find_contrib_lib(farmhash)
|
||||
|
||||
set (USE_INTERNAL_BTRIE_LIBRARY ON CACHE INTERNAL "")
|
||||
find_contrib_lib(btrie)
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
|
|
|
@ -17,4 +17,5 @@ ClickHouse is an open-source column-oriented database management system that all
|
|||
|
||||
## Upcoming Events
|
||||
|
||||
* [ClickHouse at ByteDance (in Chinese)](https://mp.weixin.qq.com/s/Em-HjPylO8D7WPui4RREAQ) on August 14, 2020.
|
||||
* [ClickHouse Data Integration Virtual Meetup](https://www.eventbrite.com/e/clickhouse-september-virtual-meetup-data-integration-tickets-117421895049) on September 10, 2020.
|
||||
* [ClickHouse talk at Ya.Subbotnik (in Russian)](https://ya.cc/t/cIBI-3yECj5JF) on September 12, 2020.
|
||||
|
|
|
@ -21,21 +21,26 @@
|
|||
#endif
|
||||
|
||||
|
||||
/// The thing to avoid creating strings to find substrings in the hash table.
|
||||
/**
|
||||
* The std::string_view-like container to avoid creating strings to find substrings in the hash table.
|
||||
*/
|
||||
struct StringRef
|
||||
{
|
||||
const char * data = nullptr;
|
||||
size_t size = 0;
|
||||
|
||||
/// Non-constexpr due to reinterpret_cast.
|
||||
template <typename CharT, typename = std::enable_if_t<sizeof(CharT) == 1>>
|
||||
constexpr StringRef(const CharT * data_, size_t size_) : data(reinterpret_cast<const char *>(data_)), size(size_)
|
||||
StringRef(const CharT * data_, size_t size_) : data(reinterpret_cast<const char *>(data_)), size(size_)
|
||||
{
|
||||
/// Sanity check for overflowed values.
|
||||
assert(size < 0x8000000000000000ULL);
|
||||
}
|
||||
|
||||
constexpr StringRef(const char * data_, size_t size_) : data(data_), size(size_) {}
|
||||
|
||||
StringRef(const std::string & s) : data(s.data()), size(s.size()) {}
|
||||
constexpr explicit StringRef(const std::string_view & s) : data(s.data()), size(s.size()) {}
|
||||
constexpr explicit StringRef(std::string_view s) : data(s.data()), size(s.size()) {}
|
||||
constexpr StringRef(const char * data_) : StringRef(std::string_view{data_}) {}
|
||||
constexpr StringRef() = default;
|
||||
|
||||
|
@ -45,6 +50,12 @@ struct StringRef
|
|||
constexpr explicit operator std::string_view() const { return {data, size}; }
|
||||
};
|
||||
|
||||
/// Here constexpr doesn't implicate inline, see https://www.viva64.com/en/w/v1043/
|
||||
/// nullptr can't be used because the StringRef values are used in SipHash's pointer arithmetics
|
||||
/// and the UBSan thinks that something like nullptr + 8 is UB.
|
||||
constexpr const inline char empty_string_ref_addr{};
|
||||
constexpr const inline StringRef EMPTY_STRING_REF{&empty_string_ref_addr, 0};
|
||||
|
||||
using StringRefs = std::vector<StringRef>;
|
||||
|
||||
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <common/types.h>
|
||||
|
||||
namespace common
|
||||
{
|
||||
template <typename T>
|
||||
|
@ -35,6 +37,21 @@ namespace common
|
|||
return (y > 0 && x > max_int128 - y) || (y < 0 && x < min_int128 - y);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool addOverflow(wInt256 x, wInt256 y, wInt256 & res)
|
||||
{
|
||||
res = x + y;
|
||||
return (y > 0 && x > std::numeric_limits<wInt256>::max() - y) ||
|
||||
(y < 0 && x < std::numeric_limits<wInt256>::min() - y);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool addOverflow(wUInt256 x, wUInt256 y, wUInt256 & res)
|
||||
{
|
||||
res = x + y;
|
||||
return x > std::numeric_limits<wUInt256>::max() - y;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool subOverflow(T x, T y, T & res)
|
||||
{
|
||||
|
@ -68,6 +85,21 @@ namespace common
|
|||
return (y < 0 && x > max_int128 + y) || (y > 0 && x < min_int128 + y);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool subOverflow(wInt256 x, wInt256 y, wInt256 & res)
|
||||
{
|
||||
res = x - y;
|
||||
return (y < 0 && x > std::numeric_limits<wInt256>::max() + y) ||
|
||||
(y > 0 && x < std::numeric_limits<wInt256>::min() + y);
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool subOverflow(wUInt256 x, wUInt256 y, wUInt256 & res)
|
||||
{
|
||||
res = x - y;
|
||||
return x < y;
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline bool mulOverflow(T x, T y, T & res)
|
||||
{
|
||||
|
@ -103,4 +135,25 @@ namespace common
|
|||
unsigned __int128 b = (y > 0) ? y : -y;
|
||||
return (a * b) / b != a;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool mulOverflow(wInt256 x, wInt256 y, wInt256 & res)
|
||||
{
|
||||
res = x * y;
|
||||
if (!x || !y)
|
||||
return false;
|
||||
|
||||
wInt256 a = (x > 0) ? x : -x;
|
||||
wInt256 b = (y > 0) ? y : -y;
|
||||
return (a * b) / b != a;
|
||||
}
|
||||
|
||||
template <>
|
||||
inline bool mulOverflow(wUInt256 x, wUInt256 y, wUInt256 & res)
|
||||
{
|
||||
res = x * y;
|
||||
if (!x || !y)
|
||||
return false;
|
||||
return (x * y) / y != x;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
#include "unaligned.h"
|
||||
#include <dlfcn.h>
|
||||
#include <string>
|
||||
#include <boost/algorithm/string/replace.hpp>
|
||||
|
||||
|
||||
std::string_view getResource(std::string_view name)
|
||||
|
@ -10,6 +11,7 @@ std::string_view getResource(std::string_view name)
|
|||
std::replace(name_replaced.begin(), name_replaced.end(), '/', '_');
|
||||
std::replace(name_replaced.begin(), name_replaced.end(), '-', '_');
|
||||
std::replace(name_replaced.begin(), name_replaced.end(), '.', '_');
|
||||
boost::replace_all(name_replaced, "+", "_PLUS_");
|
||||
|
||||
/// These are the names that are generated by "ld -r -b binary"
|
||||
std::string symbol_name_data = "_binary_" + name_replaced + "_start";
|
||||
|
|
|
@ -1,19 +1,15 @@
|
|||
include (${ClickHouse_SOURCE_DIR}/cmake/add_check.cmake)
|
||||
|
||||
add_executable (date_lut_init date_lut_init.cpp)
|
||||
add_executable (date_lut2 date_lut2.cpp)
|
||||
add_executable (date_lut3 date_lut3.cpp)
|
||||
add_executable (date_lut4 date_lut4.cpp)
|
||||
add_executable (date_lut_default_timezone date_lut_default_timezone.cpp)
|
||||
add_executable (local_date_time_comparison local_date_time_comparison.cpp)
|
||||
add_executable (realloc-perf allocator.cpp)
|
||||
|
||||
set(PLATFORM_LIBS ${CMAKE_DL_LIBS})
|
||||
|
||||
target_link_libraries (date_lut_init PRIVATE common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut2 PRIVATE common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut3 PRIVATE common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut4 PRIVATE common ${PLATFORM_LIBS})
|
||||
target_link_libraries (date_lut_default_timezone PRIVATE common ${PLATFORM_LIBS})
|
||||
target_link_libraries (local_date_time_comparison PRIVATE common)
|
||||
target_link_libraries (realloc-perf PRIVATE common)
|
||||
|
|
|
@ -1,20 +0,0 @@
|
|||
#include <iostream>
|
||||
#include <common/DateLUT.h>
|
||||
|
||||
|
||||
int main(int, char **)
|
||||
{
|
||||
/** В DateLUT был глюк - для времён из дня 1970-01-01, возвращался номер часа больше 23. */
|
||||
static const time_t time = 66130;
|
||||
|
||||
const auto & date_lut = DateLUT::instance();
|
||||
|
||||
std::cerr << date_lut.toHour(time) << std::endl;
|
||||
std::cerr << date_lut.toDayNum(time) << std::endl;
|
||||
|
||||
const auto * values = reinterpret_cast<const DateLUTImpl::Values *>(&date_lut);
|
||||
|
||||
std::cerr << values[0].date << ", " << time_t(values[1].date - values[0].date) << std::endl;
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -1,8 +0,0 @@
|
|||
#include <common/DateLUT.h>
|
||||
|
||||
/// Позволяет проверить время инициализации DateLUT.
|
||||
int main(int, char **)
|
||||
{
|
||||
DateLUT::instance();
|
||||
return 0;
|
||||
}
|
|
@ -6,6 +6,8 @@
|
|||
#include <string>
|
||||
#include <type_traits>
|
||||
|
||||
#include <common/wide_integer.h>
|
||||
|
||||
using Int8 = int8_t;
|
||||
using Int16 = int16_t;
|
||||
using Int32 = int32_t;
|
||||
|
@ -15,11 +17,20 @@ using Int64 = int64_t;
|
|||
using char8_t = unsigned char;
|
||||
#endif
|
||||
|
||||
/// This is needed for more strict aliasing. https://godbolt.org/z/xpJBSb https://stackoverflow.com/a/57453713
|
||||
using UInt8 = char8_t;
|
||||
using UInt16 = uint16_t;
|
||||
using UInt32 = uint32_t;
|
||||
using UInt64 = uint64_t;
|
||||
|
||||
using Int128 = __int128;
|
||||
|
||||
using wInt256 = std::wide_integer<256, signed>;
|
||||
using wUInt256 = std::wide_integer<256, unsigned>;
|
||||
|
||||
static_assert(sizeof(wInt256) == 32);
|
||||
static_assert(sizeof(wUInt256) == 32);
|
||||
|
||||
using String = std::string;
|
||||
|
||||
/// The standard library type traits, such as std::is_arithmetic, with one exception
|
||||
|
@ -31,6 +42,9 @@ struct is_signed
|
|||
static constexpr bool value = std::is_signed_v<T>;
|
||||
};
|
||||
|
||||
template <> struct is_signed<Int128> { static constexpr bool value = true; };
|
||||
template <> struct is_signed<wInt256> { static constexpr bool value = true; };
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_signed_v = is_signed<T>::value;
|
||||
|
||||
|
@ -40,17 +54,26 @@ struct is_unsigned
|
|||
static constexpr bool value = std::is_unsigned_v<T>;
|
||||
};
|
||||
|
||||
template <> struct is_unsigned<wUInt256> { static constexpr bool value = true; };
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_unsigned_v = is_unsigned<T>::value;
|
||||
|
||||
|
||||
/// TODO: is_integral includes char, char8_t and wchar_t.
|
||||
template <typename T>
|
||||
struct is_integral
|
||||
struct is_integer
|
||||
{
|
||||
static constexpr bool value = std::is_integral_v<T>;
|
||||
};
|
||||
|
||||
template <> struct is_integer<Int128> { static constexpr bool value = true; };
|
||||
template <> struct is_integer<wInt256> { static constexpr bool value = true; };
|
||||
template <> struct is_integer<wUInt256> { static constexpr bool value = true; };
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_integral_v = is_integral<T>::value;
|
||||
inline constexpr bool is_integer_v = is_integer<T>::value;
|
||||
|
||||
|
||||
template <typename T>
|
||||
struct is_arithmetic
|
||||
|
@ -58,5 +81,54 @@ struct is_arithmetic
|
|||
static constexpr bool value = std::is_arithmetic_v<T>;
|
||||
};
|
||||
|
||||
template <> struct is_arithmetic<__int128> { static constexpr bool value = true; };
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_arithmetic_v = is_arithmetic<T>::value;
|
||||
|
||||
template <typename T>
|
||||
struct make_unsigned
|
||||
{
|
||||
typedef std::make_unsigned_t<T> type;
|
||||
};
|
||||
|
||||
template <> struct make_unsigned<Int128> { using type = unsigned __int128; };
|
||||
template <> struct make_unsigned<wInt256> { using type = wUInt256; };
|
||||
template <> struct make_unsigned<wUInt256> { using type = wUInt256; };
|
||||
|
||||
template <typename T> using make_unsigned_t = typename make_unsigned<T>::type;
|
||||
|
||||
template <typename T>
|
||||
struct make_signed
|
||||
{
|
||||
typedef std::make_signed_t<T> type;
|
||||
};
|
||||
|
||||
template <> struct make_signed<wInt256> { using type = wInt256; };
|
||||
template <> struct make_signed<wUInt256> { using type = wInt256; };
|
||||
|
||||
template <typename T> using make_signed_t = typename make_signed<T>::type;
|
||||
|
||||
template <typename T>
|
||||
struct is_big_int
|
||||
{
|
||||
static constexpr bool value = false;
|
||||
};
|
||||
|
||||
template <> struct is_big_int<wInt256> { static constexpr bool value = true; };
|
||||
template <> struct is_big_int<wUInt256> { static constexpr bool value = true; };
|
||||
|
||||
template <typename T>
|
||||
inline constexpr bool is_big_int_v = is_big_int<T>::value;
|
||||
|
||||
template <typename T>
|
||||
inline std::string bigintToString(const T & x)
|
||||
{
|
||||
return to_string(x);
|
||||
}
|
||||
|
||||
template <typename To, typename From>
|
||||
inline To bigint_cast(const From & x [[maybe_unused]])
|
||||
{
|
||||
return static_cast<To>(x);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,249 @@
|
|||
#pragma once
|
||||
|
||||
///////////////////////////////////////////////////////////////
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See at http://www.boost.org/LICENSE_1_0.txt)
|
||||
///////////////////////////////////////////////////////////////
|
||||
|
||||
/* Divide and multiply
|
||||
*
|
||||
*
|
||||
* Copyright (c) 2008
|
||||
* Evan Teran
|
||||
*
|
||||
* Permission to use, copy, modify, and distribute this software and its
|
||||
* documentation for any purpose and without fee is hereby granted, provided
|
||||
* that the above copyright notice appears in all copies and that both the
|
||||
* copyright notice and this permission notice appear in supporting
|
||||
* documentation, and that the same name not be used in advertising or
|
||||
* publicity pertaining to distribution of the software without specific,
|
||||
* written prior permission. We make no representations about the
|
||||
* suitability this software for any purpose. It is provided "as is"
|
||||
* without express or implied warranty.
|
||||
*/
|
||||
|
||||
#include <climits> // CHAR_BIT
|
||||
#include <cmath>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <type_traits>
|
||||
|
||||
namespace std
|
||||
{
|
||||
template <size_t Bits, typename Signed>
|
||||
class wide_integer;
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
struct common_type<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>>;
|
||||
|
||||
template <size_t Bits, typename Signed, typename Arithmetic>
|
||||
struct common_type<wide_integer<Bits, Signed>, Arithmetic>;
|
||||
|
||||
template <typename Arithmetic, size_t Bits, typename Signed>
|
||||
struct common_type<Arithmetic, wide_integer<Bits, Signed>>;
|
||||
|
||||
template <size_t Bits, typename Signed>
|
||||
class wide_integer
|
||||
{
|
||||
public:
|
||||
using base_type = uint8_t;
|
||||
using signed_base_type = int8_t;
|
||||
|
||||
// ctors
|
||||
wide_integer() = default;
|
||||
|
||||
template <typename T>
|
||||
constexpr wide_integer(T rhs) noexcept;
|
||||
template <typename T>
|
||||
constexpr wide_integer(std::initializer_list<T> il) noexcept;
|
||||
|
||||
// assignment
|
||||
template <size_t Bits2, typename Signed2>
|
||||
constexpr wide_integer<Bits, Signed> & operator=(const wide_integer<Bits2, Signed2> & rhs) noexcept;
|
||||
|
||||
template <typename Arithmetic>
|
||||
constexpr wide_integer<Bits, Signed> & operator=(Arithmetic rhs) noexcept;
|
||||
|
||||
template <typename Arithmetic>
|
||||
constexpr wide_integer<Bits, Signed> & operator*=(const Arithmetic & rhs);
|
||||
|
||||
template <typename Arithmetic>
|
||||
constexpr wide_integer<Bits, Signed> & operator/=(const Arithmetic & rhs);
|
||||
|
||||
template <typename Arithmetic>
|
||||
constexpr wide_integer<Bits, Signed> & operator+=(const Arithmetic & rhs) noexcept(is_same<Signed, unsigned>::value);
|
||||
|
||||
template <typename Arithmetic>
|
||||
constexpr wide_integer<Bits, Signed> & operator-=(const Arithmetic & rhs) noexcept(is_same<Signed, unsigned>::value);
|
||||
|
||||
template <typename Integral>
|
||||
constexpr wide_integer<Bits, Signed> & operator%=(const Integral & rhs);
|
||||
|
||||
template <typename Integral>
|
||||
constexpr wide_integer<Bits, Signed> & operator&=(const Integral & rhs) noexcept;
|
||||
|
||||
template <typename Integral>
|
||||
constexpr wide_integer<Bits, Signed> & operator|=(const Integral & rhs) noexcept;
|
||||
|
||||
template <typename Integral>
|
||||
constexpr wide_integer<Bits, Signed> & operator^=(const Integral & rhs) noexcept;
|
||||
|
||||
constexpr wide_integer<Bits, Signed> & operator<<=(int n);
|
||||
constexpr wide_integer<Bits, Signed> & operator>>=(int n) noexcept;
|
||||
|
||||
constexpr wide_integer<Bits, Signed> & operator++() noexcept(is_same<Signed, unsigned>::value);
|
||||
constexpr wide_integer<Bits, Signed> operator++(int) noexcept(is_same<Signed, unsigned>::value);
|
||||
constexpr wide_integer<Bits, Signed> & operator--() noexcept(is_same<Signed, unsigned>::value);
|
||||
constexpr wide_integer<Bits, Signed> operator--(int) noexcept(is_same<Signed, unsigned>::value);
|
||||
|
||||
// observers
|
||||
|
||||
constexpr explicit operator bool() const noexcept;
|
||||
|
||||
template <class T>
|
||||
using __integral_not_wide_integer_class = typename std::enable_if<std::is_arithmetic<T>::value, T>::type;
|
||||
|
||||
template <class T, class = __integral_not_wide_integer_class<T>>
|
||||
constexpr operator T() const noexcept;
|
||||
|
||||
constexpr operator long double() const noexcept;
|
||||
constexpr operator double() const noexcept;
|
||||
constexpr operator float() const noexcept;
|
||||
|
||||
struct _impl;
|
||||
|
||||
private:
|
||||
template <size_t Bits2, typename Signed2>
|
||||
friend class wide_integer;
|
||||
|
||||
friend class numeric_limits<wide_integer<Bits, signed>>;
|
||||
friend class numeric_limits<wide_integer<Bits, unsigned>>;
|
||||
|
||||
base_type m_arr[_impl::arr_size];
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
static constexpr bool ArithmeticConcept() noexcept;
|
||||
template <class T1, class T2>
|
||||
using __only_arithmetic = typename std::enable_if<ArithmeticConcept<T1>() && ArithmeticConcept<T2>()>::type;
|
||||
|
||||
template <typename T>
|
||||
static constexpr bool IntegralConcept() noexcept;
|
||||
template <class T, class T2>
|
||||
using __only_integer = typename std::enable_if<IntegralConcept<T>() && IntegralConcept<T2>()>::type;
|
||||
|
||||
// Unary operators
|
||||
template <size_t Bits, typename Signed>
|
||||
constexpr wide_integer<Bits, Signed> operator~(const wide_integer<Bits, Signed> & lhs) noexcept;
|
||||
|
||||
template <size_t Bits, typename Signed>
|
||||
constexpr wide_integer<Bits, Signed> operator-(const wide_integer<Bits, Signed> & lhs) noexcept(is_same<Signed, unsigned>::value);
|
||||
|
||||
template <size_t Bits, typename Signed>
|
||||
constexpr wide_integer<Bits, Signed> operator+(const wide_integer<Bits, Signed> & lhs) noexcept(is_same<Signed, unsigned>::value);
|
||||
|
||||
// Binary operators
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator*(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
std::common_type_t<Arithmetic, Arithmetic2> constexpr operator*(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator/(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
std::common_type_t<Arithmetic, Arithmetic2> constexpr operator/(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator+(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
std::common_type_t<Arithmetic, Arithmetic2> constexpr operator+(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator-(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
std::common_type_t<Arithmetic, Arithmetic2> constexpr operator-(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator%(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Integral, typename Integral2, class = __only_integer<Integral, Integral2>>
|
||||
std::common_type_t<Integral, Integral2> constexpr operator%(const Integral & rhs, const Integral2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator&(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Integral, typename Integral2, class = __only_integer<Integral, Integral2>>
|
||||
std::common_type_t<Integral, Integral2> constexpr operator&(const Integral & rhs, const Integral2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator|(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Integral, typename Integral2, class = __only_integer<Integral, Integral2>>
|
||||
std::common_type_t<Integral, Integral2> constexpr operator|(const Integral & rhs, const Integral2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
std::common_type_t<wide_integer<Bits, Signed>, wide_integer<Bits2, Signed2>> constexpr
|
||||
operator^(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Integral, typename Integral2, class = __only_integer<Integral, Integral2>>
|
||||
std::common_type_t<Integral, Integral2> constexpr operator^(const Integral & rhs, const Integral2 & lhs);
|
||||
|
||||
// TODO: Integral
|
||||
template <size_t Bits, typename Signed>
|
||||
constexpr wide_integer<Bits, Signed> operator<<(const wide_integer<Bits, Signed> & lhs, int n) noexcept;
|
||||
template <size_t Bits, typename Signed>
|
||||
constexpr wide_integer<Bits, Signed> operator>>(const wide_integer<Bits, Signed> & lhs, int n) noexcept;
|
||||
|
||||
template <size_t Bits, typename Signed, typename Int, typename = std::enable_if_t<!std::is_same_v<Int, int>>>
|
||||
constexpr wide_integer<Bits, Signed> operator<<(const wide_integer<Bits, Signed> & lhs, Int n) noexcept
|
||||
{
|
||||
return lhs << int(n);
|
||||
}
|
||||
template <size_t Bits, typename Signed, typename Int, typename = std::enable_if_t<!std::is_same_v<Int, int>>>
|
||||
constexpr wide_integer<Bits, Signed> operator>>(const wide_integer<Bits, Signed> & lhs, Int n) noexcept
|
||||
{
|
||||
return lhs >> int(n);
|
||||
}
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator<(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator<(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator>(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator>(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator<=(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator<=(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator>=(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator>=(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator==(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator==(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed, size_t Bits2, typename Signed2>
|
||||
constexpr bool operator!=(const wide_integer<Bits, Signed> & lhs, const wide_integer<Bits2, Signed2> & rhs);
|
||||
template <typename Arithmetic, typename Arithmetic2, class = __only_arithmetic<Arithmetic, Arithmetic2>>
|
||||
constexpr bool operator!=(const Arithmetic & rhs, const Arithmetic2 & lhs);
|
||||
|
||||
template <size_t Bits, typename Signed>
|
||||
std::string to_string(const wide_integer<Bits, Signed> & n);
|
||||
|
||||
template <size_t Bits, typename Signed>
|
||||
struct hash<wide_integer<Bits, Signed>>;
|
||||
|
||||
}
|
||||
|
||||
#include "wide_integer_impl.h"
|
File diff suppressed because it is too large
Load Diff
|
@ -25,13 +25,15 @@ PEERDIR(
|
|||
contrib/libs/cctz/src
|
||||
contrib/libs/cxxsupp/libcxx-filesystem
|
||||
contrib/libs/poco/Net
|
||||
contrib/libs/poco/NetSSL_OpenSSL
|
||||
contrib/libs/poco/Util
|
||||
contrib/libs/poco/NetSSL_OpenSSL
|
||||
contrib/libs/fmt
|
||||
contrib/restricted/boost
|
||||
contrib/restricted/cityhash-1.0.2
|
||||
)
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
argsToConfig.cpp
|
||||
coverage.cpp
|
||||
|
@ -52,6 +54,7 @@ SRCS(
|
|||
shift10.cpp
|
||||
sleep.cpp
|
||||
terminalColors.cpp
|
||||
|
||||
)
|
||||
|
||||
END()
|
||||
|
|
|
@ -10,6 +10,7 @@ CFLAGS (GLOBAL -DARCADIA_BUILD)
|
|||
CFLAGS (GLOBAL -DUSE_CPUID=1)
|
||||
CFLAGS (GLOBAL -DUSE_JEMALLOC=0)
|
||||
CFLAGS (GLOBAL -DUSE_RAPIDJSON=1)
|
||||
CFLAGS (GLOBAL -DUSE_SSL=1)
|
||||
|
||||
IF (OS_DARWIN)
|
||||
CFLAGS (GLOBAL -DOS_DARWIN)
|
||||
|
@ -24,11 +25,14 @@ PEERDIR(
|
|||
contrib/libs/cxxsupp/libcxx-filesystem
|
||||
contrib/libs/poco/Net
|
||||
contrib/libs/poco/Util
|
||||
contrib/libs/poco/NetSSL_OpenSSL
|
||||
contrib/libs/fmt
|
||||
contrib/restricted/boost
|
||||
contrib/restricted/cityhash-1.0.2
|
||||
)
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
<? find . -name '*.cpp' | grep -v -F tests/ | grep -v -F Replxx | grep -v -F Readline | sed 's/^\.\// /' | sort ?>
|
||||
)
|
||||
|
|
|
@ -6,6 +6,8 @@ PEERDIR(
|
|||
clickhouse/src/Common
|
||||
)
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
BaseDaemon.cpp
|
||||
GraphiteWriter.cpp
|
||||
|
|
|
@ -4,6 +4,8 @@ PEERDIR(
|
|||
clickhouse/src/Common
|
||||
)
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
ExtendedLogChannel.cpp
|
||||
Loggers.cpp
|
||||
|
|
|
@ -50,6 +50,14 @@ if (NOT USE_INTERNAL_MYSQL_LIBRARY AND OPENSSL_INCLUDE_DIR)
|
|||
target_include_directories (mysqlxx SYSTEM PRIVATE ${OPENSSL_INCLUDE_DIR})
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_MYSQL_LIBRARY AND USE_STATIC_LIBRARIES)
|
||||
message(WARNING "Statically linking with system mysql/mariadb only works "
|
||||
"if mysql client libraries are built with same openssl version as "
|
||||
"we are going to use now. It wouldn't work if GnuTLS is used. "
|
||||
"Try -D\"USE_INTERNAL_MYSQL_LIBRARY\"=ON or -D\"ENABLE_MYSQL\"=OFF or "
|
||||
"-D\"USE_STATIC_LIBRARIES\"=OFF")
|
||||
endif ()
|
||||
|
||||
if (ENABLE_TESTS)
|
||||
add_subdirectory (tests)
|
||||
endif ()
|
||||
|
|
|
@ -116,7 +116,7 @@ void Connection::connect(const char* db,
|
|||
throw ConnectionFailed(errorMessage(driver.get()), mysql_errno(driver.get()));
|
||||
|
||||
/// Enables auto-reconnect.
|
||||
my_bool reconnect = true;
|
||||
bool reconnect = true;
|
||||
if (mysql_options(driver.get(), MYSQL_OPT_RECONNECT, reinterpret_cast<const char *>(&reconnect)))
|
||||
throw ConnectionFailed(errorMessage(driver.get()), mysql_errno(driver.get()));
|
||||
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include <boost/noncopyable.hpp>
|
||||
#include <mysqlxx/Types.h>
|
||||
|
||||
|
||||
namespace mysqlxx
|
||||
{
|
||||
|
||||
|
@ -22,6 +20,11 @@ class ResultBase
|
|||
public:
|
||||
ResultBase(MYSQL_RES * res_, Connection * conn_, const Query * query_);
|
||||
|
||||
ResultBase(const ResultBase &) = delete;
|
||||
ResultBase & operator=(const ResultBase &) = delete;
|
||||
ResultBase(ResultBase &&) = default;
|
||||
ResultBase & operator=(ResultBase &&) = default;
|
||||
|
||||
Connection * getConnection() { return conn; }
|
||||
MYSQL_FIELDS getFields() { return fields; }
|
||||
unsigned getNumFields() { return num_fields; }
|
||||
|
|
|
@ -254,7 +254,23 @@ template <> inline std::string Value::get<std::string >() cons
|
|||
template <> inline LocalDate Value::get<LocalDate >() const { return getDate(); }
|
||||
template <> inline LocalDateTime Value::get<LocalDateTime >() const { return getDateTime(); }
|
||||
|
||||
template <typename T> inline T Value::get() const { return T(*this); }
|
||||
|
||||
namespace details
|
||||
{
|
||||
// To avoid stack overflow when converting to type with no appropriate c-tor,
|
||||
// resulting in endless recursive calls from `Value::get<T>()` to `Value::operator T()` to `Value::get<T>()` to ...
|
||||
template <typename T, typename std::enable_if_t<std::is_constructible_v<T, Value>>>
|
||||
inline T contructFromValue(const Value & val)
|
||||
{
|
||||
return T(val);
|
||||
}
|
||||
}
|
||||
|
||||
template <typename T>
|
||||
inline T Value::get() const
|
||||
{
|
||||
return details::contructFromValue<T>(*this);
|
||||
}
|
||||
|
||||
|
||||
inline std::ostream & operator<< (std::ostream & ostr, const Value & x)
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
LIBRARY()
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
readpassphrase.c
|
||||
)
|
||||
|
|
|
@ -2,6 +2,8 @@ LIBRARY()
|
|||
|
||||
ADDINCL(GLOBAL clickhouse/base/widechar_width)
|
||||
|
||||
CFLAGS(-g0)
|
||||
|
||||
SRCS(
|
||||
widechar_width.cpp
|
||||
)
|
||||
|
|
|
@ -17,143 +17,417 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# - Find ARROW (arrow/api.h, libarrow.a, libarrow.so)
|
||||
# - Find Arrow (arrow/api.h, libarrow.a, libarrow.so)
|
||||
# This module defines
|
||||
# ARROW_FOUND, whether Arrow has been found
|
||||
# ARROW_FULL_SO_VERSION, full shared object version of found Arrow "100.0.0"
|
||||
# ARROW_IMPORT_LIB, path to libarrow's import library (Windows only)
|
||||
# ARROW_INCLUDE_DIR, directory containing headers
|
||||
# ARROW_LIBS, directory containing arrow libraries
|
||||
# ARROW_STATIC_LIB, path to libarrow.a
|
||||
# ARROW_LIBS, deprecated. Use ARROW_LIB_DIR instead
|
||||
# ARROW_LIB_DIR, directory containing Arrow libraries
|
||||
# ARROW_SHARED_IMP_LIB, deprecated. Use ARROW_IMPORT_LIB instead
|
||||
# ARROW_SHARED_LIB, path to libarrow's shared library
|
||||
# ARROW_SHARED_IMP_LIB, path to libarrow's import library (MSVC only)
|
||||
# ARROW_FOUND, whether arrow has been found
|
||||
# ARROW_SO_VERSION, shared object version of found Arrow such as "100"
|
||||
# ARROW_STATIC_LIB, path to libarrow.a
|
||||
# ARROW_VERSION, version of found Arrow
|
||||
# ARROW_VERSION_MAJOR, major version of found Arrow
|
||||
# ARROW_VERSION_MINOR, minor version of found Arrow
|
||||
# ARROW_VERSION_PATCH, patch version of found Arrow
|
||||
|
||||
if(DEFINED ARROW_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
include(FindPkgConfig)
|
||||
include(GNUInstallDirs)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
if ("$ENV{ARROW_HOME}" STREQUAL "")
|
||||
pkg_check_modules(ARROW arrow)
|
||||
if (ARROW_FOUND)
|
||||
pkg_get_variable(ARROW_SO_VERSION arrow so_version)
|
||||
set(ARROW_ABI_VERSION ${ARROW_SO_VERSION})
|
||||
message(STATUS "Arrow SO and ABI version: ${ARROW_SO_VERSION}")
|
||||
pkg_get_variable(ARROW_FULL_SO_VERSION arrow full_so_version)
|
||||
message(STATUS "Arrow full SO version: ${ARROW_FULL_SO_VERSION}")
|
||||
if ("${ARROW_INCLUDE_DIRS}" STREQUAL "")
|
||||
set(ARROW_INCLUDE_DIRS "/usr/${CMAKE_INSTALL_INCLUDEDIR}")
|
||||
endif()
|
||||
if ("${ARROW_LIBRARY_DIRS}" STREQUAL "")
|
||||
set(ARROW_LIBRARY_DIRS "/usr/${CMAKE_INSTALL_LIBDIR}")
|
||||
if (EXISTS "/etc/debian_version" AND CMAKE_LIBRARY_ARCHITECTURE)
|
||||
set(ARROW_LIBRARY_DIRS
|
||||
"${ARROW_LIBRARY_DIRS}/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||
endif()
|
||||
endif()
|
||||
set(ARROW_INCLUDE_DIR ${ARROW_INCLUDE_DIRS})
|
||||
set(ARROW_LIBS ${ARROW_LIBRARY_DIRS})
|
||||
set(ARROW_SEARCH_LIB_PATH ${ARROW_LIBRARY_DIRS})
|
||||
endif()
|
||||
else()
|
||||
set(ARROW_HOME "$ENV{ARROW_HOME}")
|
||||
|
||||
set(ARROW_SEARCH_HEADER_PATHS
|
||||
${ARROW_HOME}/include
|
||||
)
|
||||
|
||||
set(ARROW_SEARCH_LIB_PATH
|
||||
${ARROW_HOME}/lib
|
||||
)
|
||||
|
||||
find_path(ARROW_INCLUDE_DIR arrow/array.h PATHS
|
||||
${ARROW_SEARCH_HEADER_PATHS}
|
||||
# make sure we don't accidentally pick up a different version
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
set(ARROW_SEARCH_LIB_PATH_SUFFIXES)
|
||||
if(CMAKE_LIBRARY_ARCHITECTURE)
|
||||
list(APPEND ARROW_SEARCH_LIB_PATH_SUFFIXES "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
|
||||
endif()
|
||||
list(APPEND ARROW_SEARCH_LIB_PATH_SUFFIXES
|
||||
"lib64"
|
||||
"lib32"
|
||||
"lib"
|
||||
"bin")
|
||||
set(ARROW_CONFIG_SUFFIXES
|
||||
"_RELEASE"
|
||||
"_RELWITHDEBINFO"
|
||||
"_MINSIZEREL"
|
||||
"_DEBUG"
|
||||
"")
|
||||
if(CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} ARROW_CONFIG_SUFFIX_PREFERRED)
|
||||
set(ARROW_CONFIG_SUFFIX_PREFERRED "_${ARROW_CONFIG_SUFFIX_PREFERRED}")
|
||||
list(INSERT ARROW_CONFIG_SUFFIXES 0 "${ARROW_CONFIG_SUFFIX_PREFERRED}")
|
||||
endif()
|
||||
|
||||
find_library(ARROW_LIB_PATH NAMES arrow
|
||||
PATHS
|
||||
${ARROW_SEARCH_LIB_PATH}
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(ARROW_LIBS ${ARROW_LIB_PATH} DIRECTORY)
|
||||
|
||||
find_library(ARROW_PYTHON_LIB_PATH NAMES arrow_python
|
||||
PATHS
|
||||
${ARROW_SEARCH_LIB_PATH}
|
||||
NO_DEFAULT_PATH)
|
||||
get_filename_component(ARROW_PYTHON_LIBS ${ARROW_PYTHON_LIB_PATH} DIRECTORY)
|
||||
|
||||
if (MSVC)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
|
||||
if (MSVC AND NOT DEFINED ARROW_MSVC_STATIC_LIB_SUFFIX)
|
||||
if(NOT DEFINED ARROW_MSVC_STATIC_LIB_SUFFIX)
|
||||
if(MSVC)
|
||||
set(ARROW_MSVC_STATIC_LIB_SUFFIX "_static")
|
||||
endif()
|
||||
|
||||
find_library(ARROW_SHARED_LIBRARIES NAMES arrow
|
||||
PATHS ${ARROW_HOME} NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES "bin" )
|
||||
|
||||
find_library(ARROW_PYTHON_SHARED_LIBRARIES NAMES arrow_python
|
||||
PATHS ${ARROW_HOME} NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES "bin" )
|
||||
get_filename_component(ARROW_SHARED_LIBS ${ARROW_SHARED_LIBRARIES} PATH )
|
||||
get_filename_component(ARROW_PYTHON_SHARED_LIBS ${ARROW_PYTHON_SHARED_LIBRARIES} PATH )
|
||||
endif ()
|
||||
|
||||
if (ARROW_INCLUDE_DIR AND ARROW_LIBS)
|
||||
set(ARROW_FOUND TRUE)
|
||||
set(ARROW_LIB_NAME arrow)
|
||||
set(ARROW_PYTHON_LIB_NAME arrow_python)
|
||||
if (MSVC)
|
||||
set(ARROW_STATIC_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(ARROW_PYTHON_STATIC_LIB ${ARROW_PYTHON_LIBS}/${ARROW_PYTHON_LIB_NAME}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX})
|
||||
set(ARROW_SHARED_LIB ${ARROW_SHARED_LIBS}/${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(ARROW_PYTHON_SHARED_LIB ${ARROW_PYTHON_SHARED_LIBS}/${ARROW_PYTHON_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(ARROW_SHARED_IMP_LIB ${ARROW_LIBS}/${ARROW_LIB_NAME}.lib)
|
||||
set(ARROW_PYTHON_SHARED_IMP_LIB ${ARROW_PYTHON_LIBS}/${ARROW_PYTHON_LIB_NAME}.lib)
|
||||
else()
|
||||
set(ARROW_STATIC_LIB ${ARROW_LIBS}/lib${ARROW_LIB_NAME}.a)
|
||||
set(ARROW_PYTHON_STATIC_LIB ${ARROW_LIBS}/lib${ARROW_PYTHON_LIB_NAME}.a)
|
||||
|
||||
set(ARROW_SHARED_LIB ${ARROW_LIBS}/lib${ARROW_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(ARROW_PYTHON_SHARED_LIB ${ARROW_LIBS}/lib${ARROW_PYTHON_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
set(ARROW_MSVC_STATIC_LIB_SUFFIX "")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ARROW_FOUND)
|
||||
if (NOT Arrow_FIND_QUIETLY)
|
||||
message(STATUS "Found the Arrow core library: ${ARROW_LIB_PATH}")
|
||||
message(STATUS "Found the Arrow Python library: ${ARROW_PYTHON_LIB_PATH}")
|
||||
endif ()
|
||||
else ()
|
||||
if (NOT Arrow_FIND_QUIETLY)
|
||||
set(ARROW_ERR_MSG "Could not find the Arrow library. Looked for headers")
|
||||
set(ARROW_ERR_MSG "${ARROW_ERR_MSG} in ${ARROW_SEARCH_HEADER_PATHS}, and for libs")
|
||||
set(ARROW_ERR_MSG "${ARROW_ERR_MSG} in ${ARROW_SEARCH_LIB_PATH}")
|
||||
if (Arrow_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${ARROW_ERR_MSG}")
|
||||
else (Arrow_FIND_REQUIRED)
|
||||
message(STATUS "${ARROW_ERR_MSG}")
|
||||
endif (Arrow_FIND_REQUIRED)
|
||||
endif ()
|
||||
set(ARROW_FOUND FALSE)
|
||||
endif ()
|
||||
# Internal function.
|
||||
#
|
||||
# Set shared library name for ${base_name} to ${output_variable}.
|
||||
#
|
||||
# Example:
|
||||
# arrow_build_shared_library_name(ARROW_SHARED_LIBRARY_NAME arrow)
|
||||
# # -> ARROW_SHARED_LIBRARY_NAME=libarrow.so on Linux
|
||||
# # -> ARROW_SHARED_LIBRARY_NAME=libarrow.dylib on macOS
|
||||
# # -> ARROW_SHARED_LIBRARY_NAME=arrow.dll with MSVC on Windows
|
||||
# # -> ARROW_SHARED_LIBRARY_NAME=libarrow.dll with MinGW on Windows
|
||||
function(arrow_build_shared_library_name output_variable base_name)
|
||||
set(${output_variable}
|
||||
"${CMAKE_SHARED_LIBRARY_PREFIX}${base_name}${CMAKE_SHARED_LIBRARY_SUFFIX}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if (MSVC)
|
||||
mark_as_advanced(
|
||||
ARROW_INCLUDE_DIR
|
||||
ARROW_STATIC_LIB
|
||||
ARROW_SHARED_LIB
|
||||
ARROW_SHARED_IMP_LIB
|
||||
ARROW_PYTHON_STATIC_LIB
|
||||
ARROW_PYTHON_SHARED_LIB
|
||||
ARROW_PYTHON_SHARED_IMP_LIB
|
||||
)
|
||||
else()
|
||||
mark_as_advanced(
|
||||
ARROW_INCLUDE_DIR
|
||||
ARROW_STATIC_LIB
|
||||
ARROW_SHARED_LIB
|
||||
ARROW_PYTHON_STATIC_LIB
|
||||
ARROW_PYTHON_SHARED_LIB
|
||||
)
|
||||
# Internal function.
|
||||
#
|
||||
# Set import library name for ${base_name} to ${output_variable}.
|
||||
# This is useful only for MSVC build. Import library is used only
|
||||
# with MSVC build.
|
||||
#
|
||||
# Example:
|
||||
# arrow_build_import_library_name(ARROW_IMPORT_LIBRARY_NAME arrow)
|
||||
# # -> ARROW_IMPORT_LIBRARY_NAME=arrow on Linux (meaningless)
|
||||
# # -> ARROW_IMPORT_LIBRARY_NAME=arrow on macOS (meaningless)
|
||||
# # -> ARROW_IMPORT_LIBRARY_NAME=arrow.lib with MSVC on Windows
|
||||
# # -> ARROW_IMPORT_LIBRARY_NAME=libarrow.dll.a with MinGW on Windows
|
||||
function(arrow_build_import_library_name output_variable base_name)
|
||||
set(${output_variable}
|
||||
"${CMAKE_IMPORT_LIBRARY_PREFIX}${base_name}${CMAKE_IMPORT_LIBRARY_SUFFIX}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Internal function.
|
||||
#
|
||||
# Set static library name for ${base_name} to ${output_variable}.
|
||||
#
|
||||
# Example:
|
||||
# arrow_build_static_library_name(ARROW_STATIC_LIBRARY_NAME arrow)
|
||||
# # -> ARROW_STATIC_LIBRARY_NAME=libarrow.a on Linux
|
||||
# # -> ARROW_STATIC_LIBRARY_NAME=libarrow.a on macOS
|
||||
# # -> ARROW_STATIC_LIBRARY_NAME=arrow.lib with MSVC on Windows
|
||||
# # -> ARROW_STATIC_LIBRARY_NAME=libarrow.dll.a with MinGW on Windows
|
||||
function(arrow_build_static_library_name output_variable base_name)
|
||||
set(
|
||||
${output_variable}
|
||||
"${CMAKE_STATIC_LIBRARY_PREFIX}${base_name}${ARROW_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}"
|
||||
PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Internal function.
|
||||
#
|
||||
# Set macro value for ${macro_name} in ${header_content} to ${output_variable}.
|
||||
#
|
||||
# Example:
|
||||
# arrow_extract_macro_value(version_major
|
||||
# "ARROW_VERSION_MAJOR"
|
||||
# "#define ARROW_VERSION_MAJOR 1.0.0")
|
||||
# # -> version_major=1.0.0
|
||||
function(arrow_extract_macro_value output_variable macro_name header_content)
|
||||
string(REGEX MATCH "#define +${macro_name} +[^\r\n]+" macro_definition
|
||||
"${header_content}")
|
||||
string(REGEX
|
||||
REPLACE "^#define +${macro_name} +(.+)$" "\\1" macro_value "${macro_definition}")
|
||||
set(${output_variable} "${macro_value}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
# Internal macro only for arrow_find_package.
|
||||
#
|
||||
# Find package in HOME.
|
||||
macro(arrow_find_package_home)
|
||||
find_path(${prefix}_include_dir "${header_path}"
|
||||
PATHS "${home}"
|
||||
PATH_SUFFIXES "include"
|
||||
NO_DEFAULT_PATH)
|
||||
set(include_dir "${${prefix}_include_dir}")
|
||||
set(${prefix}_INCLUDE_DIR "${include_dir}" PARENT_SCOPE)
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIXES_ORIGINAL ${CMAKE_FIND_LIBRARY_SUFFIXES})
|
||||
# .dll isn't found by find_library with MSVC because .dll isn't included in
|
||||
# CMAKE_FIND_LIBRARY_SUFFIXES.
|
||||
list(APPEND CMAKE_FIND_LIBRARY_SUFFIXES "${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
endif()
|
||||
find_library(${prefix}_shared_lib
|
||||
NAMES "${shared_lib_name}"
|
||||
PATHS "${home}"
|
||||
PATH_SUFFIXES ${ARROW_SEARCH_LIB_PATH_SUFFIXES}
|
||||
NO_DEFAULT_PATH)
|
||||
if(MSVC)
|
||||
set(CMAKE_SHARED_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES_ORIGINAL})
|
||||
endif()
|
||||
set(shared_lib "${${prefix}_shared_lib}")
|
||||
set(${prefix}_SHARED_LIB "${shared_lib}" PARENT_SCOPE)
|
||||
if(shared_lib)
|
||||
add_library(${target_shared} SHARED IMPORTED)
|
||||
set_target_properties(${target_shared} PROPERTIES IMPORTED_LOCATION "${shared_lib}")
|
||||
if(include_dir)
|
||||
set_target_properties(${target_shared}
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dir}")
|
||||
endif()
|
||||
find_library(${prefix}_import_lib
|
||||
NAMES "${import_lib_name}"
|
||||
PATHS "${home}"
|
||||
PATH_SUFFIXES ${ARROW_SEARCH_LIB_PATH_SUFFIXES}
|
||||
NO_DEFAULT_PATH)
|
||||
set(import_lib "${${prefix}_import_lib}")
|
||||
set(${prefix}_IMPORT_LIB "${import_lib}" PARENT_SCOPE)
|
||||
if(import_lib)
|
||||
set_target_properties(${target_shared} PROPERTIES IMPORTED_IMPLIB "${import_lib}")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
find_library(${prefix}_static_lib
|
||||
NAMES "${static_lib_name}"
|
||||
PATHS "${home}"
|
||||
PATH_SUFFIXES ${ARROW_SEARCH_LIB_PATH_SUFFIXES}
|
||||
NO_DEFAULT_PATH)
|
||||
set(static_lib "${${prefix}_static_lib}")
|
||||
set(${prefix}_STATIC_LIB "${static_lib}" PARENT_SCOPE)
|
||||
if(static_lib)
|
||||
add_library(${target_static} STATIC IMPORTED)
|
||||
set_target_properties(${target_static} PROPERTIES IMPORTED_LOCATION "${static_lib}")
|
||||
if(include_dir)
|
||||
set_target_properties(${target_static}
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dir}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Internal macro only for arrow_find_package.
|
||||
#
|
||||
# Find package by CMake package configuration.
|
||||
macro(arrow_find_package_cmake_package_configuration)
|
||||
find_package(${cmake_package_name} CONFIG)
|
||||
if(${cmake_package_name}_FOUND)
|
||||
set(${prefix}_USE_CMAKE_PACKAGE_CONFIG TRUE PARENT_SCOPE)
|
||||
if(TARGET ${target_shared})
|
||||
foreach(suffix ${ARROW_CONFIG_SUFFIXES})
|
||||
get_target_property(shared_lib ${target_shared} IMPORTED_LOCATION${suffix})
|
||||
if(shared_lib)
|
||||
# Remove shared library version:
|
||||
# libarrow.so.100.0.0 -> libarrow.so
|
||||
# Because ARROW_HOME and pkg-config approaches don't add
|
||||
# shared library version.
|
||||
string(REGEX
|
||||
REPLACE "(${CMAKE_SHARED_LIBRARY_SUFFIX})[.0-9]+$" "\\1" shared_lib
|
||||
"${shared_lib}")
|
||||
set(${prefix}_SHARED_LIB "${shared_lib}" PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
if(TARGET ${target_static})
|
||||
foreach(suffix ${ARROW_CONFIG_SUFFIXES})
|
||||
get_target_property(static_lib ${target_static} IMPORTED_LOCATION${suffix})
|
||||
if(static_lib)
|
||||
set(${prefix}_STATIC_LIB "${static_lib}" PARENT_SCOPE)
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
# Internal macro only for arrow_find_package.
|
||||
#
|
||||
# Find package by pkg-config.
|
||||
macro(arrow_find_package_pkg_config)
|
||||
pkg_check_modules(${prefix}_PC ${pkg_config_name})
|
||||
if(${prefix}_PC_FOUND)
|
||||
set(${prefix}_USE_PKG_CONFIG TRUE PARENT_SCOPE)
|
||||
|
||||
set(include_dir "${${prefix}_PC_INCLUDEDIR}")
|
||||
set(lib_dir "${${prefix}_PC_LIBDIR}")
|
||||
set(shared_lib_paths "${${prefix}_PC_LINK_LIBRARIES}")
|
||||
# Use the first shared library path as the IMPORTED_LOCATION
|
||||
# for ${target_shared}. This assumes that the first shared library
|
||||
# path is the shared library path for this module.
|
||||
list(GET shared_lib_paths 0 first_shared_lib_path)
|
||||
# Use the rest shared library paths as the INTERFACE_LINK_LIBRARIES
|
||||
# for ${target_shared}. This assumes that the rest shared library
|
||||
# paths are dependency library paths for this module.
|
||||
list(LENGTH shared_lib_paths n_shared_lib_paths)
|
||||
if(n_shared_lib_paths LESS_EQUAL 1)
|
||||
set(rest_shared_lib_paths)
|
||||
else()
|
||||
list(SUBLIST
|
||||
shared_lib_paths
|
||||
1
|
||||
-1
|
||||
rest_shared_lib_paths)
|
||||
endif()
|
||||
|
||||
set(${prefix}_VERSION "${${prefix}_PC_VERSION}" PARENT_SCOPE)
|
||||
set(${prefix}_INCLUDE_DIR "${include_dir}" PARENT_SCOPE)
|
||||
set(${prefix}_SHARED_LIB "${first_shared_lib_path}" PARENT_SCOPE)
|
||||
|
||||
add_library(${target_shared} SHARED IMPORTED)
|
||||
set_target_properties(${target_shared}
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES
|
||||
"${include_dir}"
|
||||
INTERFACE_LINK_LIBRARIES
|
||||
"${rest_shared_lib_paths}"
|
||||
IMPORTED_LOCATION
|
||||
"${first_shared_lib_path}")
|
||||
get_target_property(shared_lib ${target_shared} IMPORTED_LOCATION)
|
||||
|
||||
find_library(${prefix}_static_lib
|
||||
NAMES "${static_lib_name}"
|
||||
PATHS "${lib_dir}"
|
||||
NO_DEFAULT_PATH)
|
||||
set(static_lib "${${prefix}_static_lib}")
|
||||
set(${prefix}_STATIC_LIB "${static_lib}" PARENT_SCOPE)
|
||||
if(static_lib)
|
||||
add_library(${target_static} STATIC IMPORTED)
|
||||
set_target_properties(${target_static}
|
||||
PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${include_dir}"
|
||||
IMPORTED_LOCATION "${static_lib}")
|
||||
endif()
|
||||
endif()
|
||||
endmacro()
|
||||
|
||||
function(arrow_find_package
|
||||
prefix
|
||||
home
|
||||
base_name
|
||||
header_path
|
||||
cmake_package_name
|
||||
pkg_config_name)
|
||||
arrow_build_shared_library_name(shared_lib_name ${base_name})
|
||||
arrow_build_import_library_name(import_lib_name ${base_name})
|
||||
arrow_build_static_library_name(static_lib_name ${base_name})
|
||||
|
||||
set(target_shared ${base_name}_shared)
|
||||
set(target_static ${base_name}_static)
|
||||
|
||||
if(home)
|
||||
arrow_find_package_home()
|
||||
set(${prefix}_FIND_APPROACH "HOME: ${home}" PARENT_SCOPE)
|
||||
else()
|
||||
arrow_find_package_cmake_package_configuration()
|
||||
if(${cmake_package_name}_FOUND)
|
||||
set(${prefix}_FIND_APPROACH
|
||||
"CMake package configuration: ${cmake_package_name}"
|
||||
PARENT_SCOPE)
|
||||
else()
|
||||
arrow_find_package_pkg_config()
|
||||
set(${prefix}_FIND_APPROACH "pkg-config: ${pkg_config_name}" PARENT_SCOPE)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT include_dir)
|
||||
if(TARGET ${target_shared})
|
||||
get_target_property(include_dir ${target_shared} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
elseif(TARGET ${target_static})
|
||||
get_target_property(include_dir ${target_static} INTERFACE_INCLUDE_DIRECTORIES)
|
||||
endif()
|
||||
endif()
|
||||
if(include_dir)
|
||||
set(${prefix}_INCLUDE_DIR "${include_dir}" PARENT_SCOPE)
|
||||
endif()
|
||||
|
||||
if(shared_lib)
|
||||
get_filename_component(lib_dir "${shared_lib}" DIRECTORY)
|
||||
elseif(static_lib)
|
||||
get_filename_component(lib_dir "${static_lib}" DIRECTORY)
|
||||
else()
|
||||
set(lib_dir NOTFOUND)
|
||||
endif()
|
||||
set(${prefix}_LIB_DIR "${lib_dir}" PARENT_SCOPE)
|
||||
# For backward compatibility
|
||||
set(${prefix}_LIBS "${lib_dir}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
if(NOT "$ENV{ARROW_HOME}" STREQUAL "")
|
||||
file(TO_CMAKE_PATH "$ENV{ARROW_HOME}" ARROW_HOME)
|
||||
endif()
|
||||
arrow_find_package(ARROW
|
||||
"${ARROW_HOME}"
|
||||
arrow
|
||||
arrow/api.h
|
||||
Arrow
|
||||
arrow)
|
||||
|
||||
if(ARROW_HOME)
|
||||
if(ARROW_INCLUDE_DIR)
|
||||
file(READ "${ARROW_INCLUDE_DIR}/arrow/util/config.h" ARROW_CONFIG_H_CONTENT)
|
||||
arrow_extract_macro_value(ARROW_VERSION_MAJOR "ARROW_VERSION_MAJOR"
|
||||
"${ARROW_CONFIG_H_CONTENT}")
|
||||
arrow_extract_macro_value(ARROW_VERSION_MINOR "ARROW_VERSION_MINOR"
|
||||
"${ARROW_CONFIG_H_CONTENT}")
|
||||
arrow_extract_macro_value(ARROW_VERSION_PATCH "ARROW_VERSION_PATCH"
|
||||
"${ARROW_CONFIG_H_CONTENT}")
|
||||
if("${ARROW_VERSION_MAJOR}" STREQUAL ""
|
||||
OR "${ARROW_VERSION_MINOR}" STREQUAL ""
|
||||
OR "${ARROW_VERSION_PATCH}" STREQUAL "")
|
||||
set(ARROW_VERSION "0.0.0")
|
||||
else()
|
||||
set(ARROW_VERSION
|
||||
"${ARROW_VERSION_MAJOR}.${ARROW_VERSION_MINOR}.${ARROW_VERSION_PATCH}")
|
||||
endif()
|
||||
|
||||
arrow_extract_macro_value(ARROW_SO_VERSION_QUOTED "ARROW_SO_VERSION"
|
||||
"${ARROW_CONFIG_H_CONTENT}")
|
||||
string(REGEX REPLACE "^\"(.+)\"$" "\\1" ARROW_SO_VERSION "${ARROW_SO_VERSION_QUOTED}")
|
||||
arrow_extract_macro_value(ARROW_FULL_SO_VERSION_QUOTED "ARROW_FULL_SO_VERSION"
|
||||
"${ARROW_CONFIG_H_CONTENT}")
|
||||
string(REGEX
|
||||
REPLACE "^\"(.+)\"$" "\\1" ARROW_FULL_SO_VERSION
|
||||
"${ARROW_FULL_SO_VERSION_QUOTED}")
|
||||
endif()
|
||||
else()
|
||||
if(ARROW_USE_CMAKE_PACKAGE_CONFIG)
|
||||
find_package(Arrow CONFIG)
|
||||
elseif(ARROW_USE_PKG_CONFIG)
|
||||
pkg_get_variable(ARROW_SO_VERSION arrow so_version)
|
||||
pkg_get_variable(ARROW_FULL_SO_VERSION arrow full_so_version)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(ARROW_ABI_VERSION ${ARROW_SO_VERSION})
|
||||
|
||||
mark_as_advanced(ARROW_ABI_VERSION
|
||||
ARROW_CONFIG_SUFFIXES
|
||||
ARROW_FULL_SO_VERSION
|
||||
ARROW_IMPORT_LIB
|
||||
ARROW_INCLUDE_DIR
|
||||
ARROW_LIBS
|
||||
ARROW_LIB_DIR
|
||||
ARROW_SEARCH_LIB_PATH_SUFFIXES
|
||||
ARROW_SHARED_IMP_LIB
|
||||
ARROW_SHARED_LIB
|
||||
ARROW_SO_VERSION
|
||||
ARROW_STATIC_LIB
|
||||
ARROW_VERSION
|
||||
ARROW_VERSION_MAJOR
|
||||
ARROW_VERSION_MINOR
|
||||
ARROW_VERSION_PATCH)
|
||||
|
||||
find_package_handle_standard_args(Arrow REQUIRED_VARS
|
||||
# The first required variable is shown
|
||||
# in the found message. So this list is
|
||||
# not sorted alphabetically.
|
||||
ARROW_INCLUDE_DIR
|
||||
ARROW_LIB_DIR
|
||||
ARROW_FULL_SO_VERSION
|
||||
ARROW_SO_VERSION
|
||||
VERSION_VAR
|
||||
ARROW_VERSION)
|
||||
set(ARROW_FOUND ${Arrow_FOUND})
|
||||
|
||||
if(Arrow_FOUND AND NOT Arrow_FIND_QUIETLY)
|
||||
message(STATUS "Arrow version: ${ARROW_VERSION} (${ARROW_FIND_APPROACH})")
|
||||
message(STATUS "Arrow SO and ABI version: ${ARROW_SO_VERSION}")
|
||||
message(STATUS "Arrow full SO version: ${ARROW_FULL_SO_VERSION}")
|
||||
message(STATUS "Found the Arrow core shared library: ${ARROW_SHARED_LIB}")
|
||||
message(STATUS "Found the Arrow core import library: ${ARROW_IMPORT_LIB}")
|
||||
message(STATUS "Found the Arrow core static library: ${ARROW_STATIC_LIB}")
|
||||
endif()
|
||||
|
|
|
@ -17,131 +17,116 @@
|
|||
# specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
# - Find PARQUET (parquet/parquet.h, libparquet.a, libparquet.so)
|
||||
# - Find Parquet (parquet/api/reader.h, libparquet.a, libparquet.so)
|
||||
#
|
||||
# This module requires Arrow from which it uses
|
||||
# arrow_find_package()
|
||||
#
|
||||
# This module defines
|
||||
# PARQUET_FOUND, whether Parquet has been found
|
||||
# PARQUET_IMPORT_LIB, path to libparquet's import library (Windows only)
|
||||
# PARQUET_INCLUDE_DIR, directory containing headers
|
||||
# PARQUET_LIBS, directory containing parquet libraries
|
||||
# PARQUET_STATIC_LIB, path to libparquet.a
|
||||
# PARQUET_LIBS, deprecated. Use PARQUET_LIB_DIR instead
|
||||
# PARQUET_LIB_DIR, directory containing Parquet libraries
|
||||
# PARQUET_SHARED_IMP_LIB, deprecated. Use PARQUET_IMPORT_LIB instead
|
||||
# PARQUET_SHARED_LIB, path to libparquet's shared library
|
||||
# PARQUET_SHARED_IMP_LIB, path to libparquet's import library (MSVC only)
|
||||
# PARQUET_FOUND, whether parquet has been found
|
||||
# PARQUET_SO_VERSION, shared object version of found Parquet such as "100"
|
||||
# PARQUET_STATIC_LIB, path to libparquet.a
|
||||
|
||||
include(FindPkgConfig)
|
||||
if(DEFINED PARQUET_FOUND)
|
||||
return()
|
||||
endif()
|
||||
|
||||
set(find_package_arguments)
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION)
|
||||
list(APPEND find_package_arguments "${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION}")
|
||||
endif()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_REQUIRED)
|
||||
list(APPEND find_package_arguments REQUIRED)
|
||||
endif()
|
||||
if(${CMAKE_FIND_PACKAGE_NAME}_FIND_QUIETLY)
|
||||
list(APPEND find_package_arguments QUIET)
|
||||
endif()
|
||||
find_package(Arrow ${find_package_arguments})
|
||||
|
||||
if(NOT "$ENV{PARQUET_HOME}" STREQUAL "")
|
||||
set(PARQUET_HOME "$ENV{PARQUET_HOME}")
|
||||
file(TO_CMAKE_PATH "$ENV{PARQUET_HOME}" PARQUET_HOME)
|
||||
endif()
|
||||
|
||||
if (MSVC)
|
||||
SET(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll")
|
||||
if((NOT PARQUET_HOME) AND ARROW_HOME)
|
||||
set(PARQUET_HOME ${ARROW_HOME})
|
||||
endif()
|
||||
|
||||
if (MSVC AND NOT DEFINED PARQUET_MSVC_STATIC_LIB_SUFFIX)
|
||||
set(PARQUET_MSVC_STATIC_LIB_SUFFIX "_static")
|
||||
endif()
|
||||
|
||||
find_library(PARQUET_SHARED_LIBRARIES NAMES parquet
|
||||
PATHS ${PARQUET_HOME} NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES "bin" )
|
||||
|
||||
get_filename_component(PARQUET_SHARED_LIBS ${PARQUET_SHARED_LIBRARIES} PATH )
|
||||
endif ()
|
||||
|
||||
if(PARQUET_HOME)
|
||||
set(PARQUET_SEARCH_HEADER_PATHS
|
||||
${PARQUET_HOME}/include
|
||||
)
|
||||
set(PARQUET_SEARCH_LIB_PATH
|
||||
${PARQUET_HOME}/lib
|
||||
)
|
||||
find_path(PARQUET_INCLUDE_DIR parquet/api/reader.h PATHS
|
||||
${PARQUET_SEARCH_HEADER_PATHS}
|
||||
# make sure we don't accidentally pick up a different version
|
||||
NO_DEFAULT_PATH
|
||||
)
|
||||
find_library(PARQUET_LIBRARIES NAMES parquet
|
||||
PATHS ${PARQUET_HOME} NO_DEFAULT_PATH
|
||||
PATH_SUFFIXES "lib")
|
||||
get_filename_component(PARQUET_LIBS ${PARQUET_LIBRARIES} PATH )
|
||||
|
||||
# Try to autodiscover the Parquet ABI version
|
||||
get_filename_component(PARQUET_LIB_REALPATH ${PARQUET_LIBRARIES} REALPATH)
|
||||
get_filename_component(PARQUET_EXT_REALPATH ${PARQUET_LIB_REALPATH} EXT)
|
||||
string(REGEX MATCH ".([0-9]+.[0-9]+.[0-9]+)" HAS_ABI_VERSION ${PARQUET_EXT_REALPATH})
|
||||
if (HAS_ABI_VERSION)
|
||||
if (APPLE)
|
||||
string(REGEX REPLACE ".([0-9]+.[0-9]+.[0-9]+).dylib" "\\1" PARQUET_ABI_VERSION ${PARQUET_EXT_REALPATH})
|
||||
if(ARROW_FOUND)
|
||||
arrow_find_package(PARQUET
|
||||
"${PARQUET_HOME}"
|
||||
parquet
|
||||
parquet/api/reader.h
|
||||
Parquet
|
||||
parquet)
|
||||
if(PARQUET_HOME)
|
||||
if(PARQUET_INCLUDE_DIR)
|
||||
file(READ "${PARQUET_INCLUDE_DIR}/parquet/parquet_version.h"
|
||||
PARQUET_VERSION_H_CONTENT)
|
||||
arrow_extract_macro_value(PARQUET_VERSION_MAJOR "PARQUET_VERSION_MAJOR"
|
||||
"${PARQUET_VERSION_H_CONTENT}")
|
||||
arrow_extract_macro_value(PARQUET_VERSION_MINOR "PARQUET_VERSION_MINOR"
|
||||
"${PARQUET_VERSION_H_CONTENT}")
|
||||
arrow_extract_macro_value(PARQUET_VERSION_PATCH "PARQUET_VERSION_PATCH"
|
||||
"${PARQUET_VERSION_H_CONTENT}")
|
||||
if("${PARQUET_VERSION_MAJOR}" STREQUAL ""
|
||||
OR "${PARQUET_VERSION_MINOR}" STREQUAL ""
|
||||
OR "${PARQUET_VERSION_PATCH}" STREQUAL "")
|
||||
set(PARQUET_VERSION "0.0.0")
|
||||
else()
|
||||
string(REGEX REPLACE ".so.([0-9]+.[0-9]+.[0-9]+)" "\\1" PARQUET_ABI_VERSION ${PARQUET_EXT_REALPATH})
|
||||
set(PARQUET_VERSION
|
||||
"${PARQUET_VERSION_MAJOR}.${PARQUET_VERSION_MINOR}.${PARQUET_VERSION_PATCH}")
|
||||
endif()
|
||||
string(REGEX REPLACE "([0-9]+).[0-9]+.[0-9]+" "\\1" PARQUET_SO_VERSION ${PARQUET_ABI_VERSION})
|
||||
else()
|
||||
set(PARQUET_ABI_VERSION "1.0.0")
|
||||
set(PARQUET_SO_VERSION "1")
|
||||
|
||||
arrow_extract_macro_value(PARQUET_SO_VERSION_QUOTED "PARQUET_SO_VERSION"
|
||||
"${PARQUET_VERSION_H_CONTENT}")
|
||||
string(REGEX
|
||||
REPLACE "^\"(.+)\"$" "\\1" PARQUET_SO_VERSION "${PARQUET_SO_VERSION_QUOTED}")
|
||||
arrow_extract_macro_value(PARQUET_FULL_SO_VERSION_QUOTED "PARQUET_FULL_SO_VERSION"
|
||||
"${PARQUET_VERSION_H_CONTENT}")
|
||||
string(REGEX
|
||||
REPLACE "^\"(.+)\"$" "\\1" PARQUET_FULL_SO_VERSION
|
||||
"${PARQUET_FULL_SO_VERSION_QUOTED}")
|
||||
endif()
|
||||
else()
|
||||
pkg_check_modules(PARQUET parquet)
|
||||
if (PARQUET_FOUND)
|
||||
pkg_get_variable(PARQUET_ABI_VERSION parquet abi_version)
|
||||
message(STATUS "Parquet C++ ABI version: ${PARQUET_ABI_VERSION}")
|
||||
pkg_get_variable(PARQUET_SO_VERSION parquet so_version)
|
||||
message(STATUS "Parquet C++ SO version: ${PARQUET_SO_VERSION}")
|
||||
set(PARQUET_INCLUDE_DIR ${PARQUET_INCLUDE_DIRS})
|
||||
set(PARQUET_LIBS ${PARQUET_LIBRARY_DIRS})
|
||||
set(PARQUET_SEARCH_LIB_PATH ${PARQUET_LIBRARY_DIRS})
|
||||
message(STATUS "Searching for parquet libs in: ${PARQUET_SEARCH_LIB_PATH}")
|
||||
find_library(PARQUET_LIBRARIES NAMES parquet
|
||||
PATHS ${PARQUET_SEARCH_LIB_PATH} NO_DEFAULT_PATH)
|
||||
else()
|
||||
find_path(PARQUET_INCLUDE_DIR NAMES parquet/api/reader.h )
|
||||
find_library(PARQUET_LIBRARIES NAMES parquet)
|
||||
get_filename_component(PARQUET_LIBS ${PARQUET_LIBRARIES} PATH )
|
||||
else()
|
||||
if(PARQUET_USE_CMAKE_PACKAGE_CONFIG)
|
||||
find_package(Parquet CONFIG)
|
||||
elseif(PARQUET_USE_PKG_CONFIG)
|
||||
pkg_get_variable(PARQUET_SO_VERSION parquet so_version)
|
||||
pkg_get_variable(PARQUET_FULL_SO_VERSION parquet full_so_version)
|
||||
endif()
|
||||
endif()
|
||||
set(PARQUET_ABI_VERSION "${PARQUET_SO_VERSION}")
|
||||
endif()
|
||||
|
||||
if (PARQUET_INCLUDE_DIR AND PARQUET_LIBRARIES)
|
||||
set(PARQUET_FOUND TRUE)
|
||||
set(PARQUET_LIB_NAME parquet)
|
||||
if (MSVC)
|
||||
set(PARQUET_STATIC_LIB "${PARQUET_LIBS}/${PARQUET_LIB_NAME}${PARQUET_MSVC_STATIC_LIB_SUFFIX}${CMAKE_STATIC_LIBRARY_SUFFIX}")
|
||||
set(PARQUET_SHARED_LIB "${PARQUET_SHARED_LIBS}/${PARQUET_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
||||
set(PARQUET_SHARED_IMP_LIB "${PARQUET_LIBS}/${PARQUET_LIB_NAME}.lib")
|
||||
else()
|
||||
set(PARQUET_STATIC_LIB ${PARQUET_LIBS}/${CMAKE_STATIC_LIBRARY_PREFIX}${PARQUET_LIB_NAME}.a)
|
||||
set(PARQUET_SHARED_LIB ${PARQUET_LIBS}/${CMAKE_SHARED_LIBRARY_PREFIX}${PARQUET_LIB_NAME}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
||||
endif()
|
||||
else ()
|
||||
set(PARQUET_FOUND FALSE)
|
||||
endif ()
|
||||
mark_as_advanced(PARQUET_ABI_VERSION
|
||||
PARQUET_IMPORT_LIB
|
||||
PARQUET_INCLUDE_DIR
|
||||
PARQUET_LIBS
|
||||
PARQUET_LIB_DIR
|
||||
PARQUET_SHARED_IMP_LIB
|
||||
PARQUET_SHARED_LIB
|
||||
PARQUET_SO_VERSION
|
||||
PARQUET_STATIC_LIB
|
||||
PARQUET_VERSION)
|
||||
|
||||
if (PARQUET_FOUND)
|
||||
if (NOT Parquet_FIND_QUIETLY)
|
||||
message(STATUS "Found the Parquet library: ${PARQUET_LIBRARIES}")
|
||||
endif ()
|
||||
else ()
|
||||
if (NOT Parquet_FIND_QUIETLY)
|
||||
if (NOT PARQUET_FOUND)
|
||||
set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} Could not find the parquet library.")
|
||||
endif()
|
||||
find_package_handle_standard_args(Parquet
|
||||
REQUIRED_VARS
|
||||
PARQUET_INCLUDE_DIR
|
||||
PARQUET_LIB_DIR
|
||||
PARQUET_SO_VERSION
|
||||
VERSION_VAR
|
||||
PARQUET_VERSION)
|
||||
set(PARQUET_FOUND ${Parquet_FOUND})
|
||||
|
||||
set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} Looked in ")
|
||||
if ( _parquet_roots )
|
||||
set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} in ${_parquet_roots}.")
|
||||
else ()
|
||||
set(PARQUET_ERR_MSG "${PARQUET_ERR_MSG} system search paths.")
|
||||
endif ()
|
||||
if (Parquet_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "${PARQUET_ERR_MSG}")
|
||||
else (Parquet_FIND_REQUIRED)
|
||||
message(STATUS "${PARQUET_ERR_MSG}")
|
||||
endif (Parquet_FIND_REQUIRED)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(
|
||||
PARQUET_FOUND
|
||||
PARQUET_INCLUDE_DIR
|
||||
PARQUET_LIBS
|
||||
PARQUET_LIBRARIES
|
||||
PARQUET_STATIC_LIB
|
||||
PARQUET_SHARED_LIB
|
||||
)
|
||||
if(Parquet_FOUND AND NOT Parquet_FIND_QUIETLY)
|
||||
message(STATUS "Parquet version: ${PARQUET_VERSION} (${PARQUET_FIND_APPROACH})")
|
||||
message(STATUS "Found the Parquet shared library: ${PARQUET_SHARED_LIB}")
|
||||
message(STATUS "Found the Parquet import library: ${PARQUET_IMPORT_LIB}")
|
||||
message(STATUS "Found the Parquet static library: ${PARQUET_STATIC_LIB}")
|
||||
endif()
|
||||
|
|
|
@ -12,7 +12,9 @@ if (ENABLE_CLANG_TIDY)
|
|||
set (USE_CLANG_TIDY 1)
|
||||
# The variable CMAKE_CXX_CLANG_TIDY will be set inside src and base directories with non third-party code.
|
||||
# set (CMAKE_CXX_CLANG_TIDY "${CLANG_TIDY_PATH}")
|
||||
elseif (FAIL_ON_UNSUPPORTED_OPTIONS_COMBINATION)
|
||||
message(FATAL_ERROR "clang-tidy is not found")
|
||||
else ()
|
||||
message(STATUS "clang-tidy is not found. This is normal - the tool is used only for static code analysis and not essential for build.")
|
||||
message(STATUS "clang-tidy is not found. This is normal - the tool is only used for static code analysis and isn't essential for the build.")
|
||||
endif ()
|
||||
endif ()
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# This strings autochanged from release_lib.sh:
|
||||
SET(VERSION_REVISION 54438)
|
||||
SET(VERSION_REVISION 54440)
|
||||
SET(VERSION_MAJOR 20)
|
||||
SET(VERSION_MINOR 8)
|
||||
SET(VERSION_MINOR 10)
|
||||
SET(VERSION_PATCH 1)
|
||||
SET(VERSION_GITHASH 5d60ab33a511efd149c7c3de77c0dd4b81e65b13)
|
||||
SET(VERSION_DESCRIBE v20.8.1.1-prestable)
|
||||
SET(VERSION_STRING 20.8.1.1)
|
||||
SET(VERSION_GITHASH 11a247d2f42010c1a17bf678c3e00a4bc89b23f8)
|
||||
SET(VERSION_DESCRIBE v20.10.1.1-prestable)
|
||||
SET(VERSION_STRING 20.10.1.1)
|
||||
# end of autochange
|
||||
|
|
|
@ -8,6 +8,9 @@ macro(find_contrib_lib LIB_NAME)
|
|||
|
||||
if (NOT USE_INTERNAL_${LIB_NAME_UC}_LIBRARY)
|
||||
find_package ("${LIB_NAME}")
|
||||
if (NOT ${LIB_NAME_UC}_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use system ${LIB_NAME}")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT ${LIB_NAME_UC}_FOUND)
|
||||
|
@ -17,5 +20,4 @@ macro(find_contrib_lib LIB_NAME)
|
|||
endif ()
|
||||
|
||||
message (STATUS "Using ${LIB_NAME}: ${${LIB_NAME_UC}_INCLUDE_DIR} : ${${LIB_NAME_UC}_LIBRARIES}")
|
||||
|
||||
endmacro()
|
||||
|
|
|
@ -1,21 +1,22 @@
|
|||
option(ENABLE_AMQPCPP "Enalbe AMQP-CPP" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_AMQPCPP)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/AMQP-CPP is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (ENABLE_AMQPCPP 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal AMQP-CPP library")
|
||||
set (USE_AMQPCPP 0)
|
||||
return()
|
||||
endif ()
|
||||
|
||||
if (ENABLE_AMQPCPP)
|
||||
set (USE_AMQPCPP 1)
|
||||
set (AMQPCPP_LIBRARY AMQP-CPP)
|
||||
|
||||
set (USE_AMQPCPP 1)
|
||||
set (AMQPCPP_LIBRARY AMQP-CPP)
|
||||
|
||||
set (AMQPCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include")
|
||||
|
||||
list (APPEND AMQPCPP_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include"
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP")
|
||||
|
||||
endif()
|
||||
set (AMQPCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include")
|
||||
list (APPEND AMQPCPP_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP/include"
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/AMQP-CPP")
|
||||
|
||||
message (STATUS "Using AMQP-CPP=${USE_AMQPCPP}: ${AMQPCPP_INCLUDE_DIR} : ${AMQPCPP_LIBRARY}")
|
||||
|
|
|
@ -1,28 +1,35 @@
|
|||
option (ENABLE_AVRO "Enable Avro" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_AVRO)
|
||||
if (NOT ENABLE_AVRO)
|
||||
if (USE_INTERNAL_AVRO_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal avro library with ENABLE_AVRO=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_AVRO_LIBRARY "Set to FALSE to use system avro library instead of bundled" ${NOT_UNBUNDLED})
|
||||
option (USE_INTERNAL_AVRO_LIBRARY
|
||||
"Set to FALSE to use system avro library instead of bundled" ON) # TODO: provide unbundled support
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/CMakeLists.txt")
|
||||
if(USE_INTERNAL_AVRO_LIBRARY)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/CMakeLists.txt")
|
||||
if (USE_INTERNAL_AVRO_LIBRARY)
|
||||
message(WARNING "submodule contrib/avro is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot find internal avro")
|
||||
set(USE_INTERNAL_AVRO_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_AVRO_LIBRARY 1)
|
||||
set(USE_INTERNAL_AVRO_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
if (NOT USE_INTERNAL_AVRO_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using system avro library is not supported yet")
|
||||
elseif(NOT MISSING_INTERNAL_AVRO_LIBRARY)
|
||||
include(cmake/find/snappy.cmake)
|
||||
set(AVROCPP_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/avro/lang/c++/include")
|
||||
set(AVROCPP_LIBRARY avrocpp)
|
||||
set(USE_INTERNAL_AVRO_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (AVROCPP_LIBRARY AND AVROCPP_INCLUDE_DIR)
|
||||
set(USE_AVRO 1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using avro=${USE_AVRO}: ${AVROCPP_INCLUDE_DIR} : ${AVROCPP_LIBRARY}")
|
||||
|
|
|
@ -1,17 +1,21 @@
|
|||
option (ENABLE_BASE64 "Enable base64" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_BASE64)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/base64/LICENSE")
|
||||
set (MISSING_INTERNAL_BASE64_LIBRARY 1)
|
||||
message (WARNING "submodule contrib/base64 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
endif ()
|
||||
|
||||
if (NOT MISSING_INTERNAL_BASE64_LIBRARY)
|
||||
option (ENABLE_BASE64 "Enable base64" ${ENABLE_LIBRARIES})
|
||||
endif ()
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/base64")
|
||||
message (WARNING "submodule contrib/base64 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
else()
|
||||
set (BASE64_LIBRARY base64)
|
||||
set (USE_BASE64 1)
|
||||
endif()
|
||||
|
||||
if (ENABLE_BASE64)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/base64")
|
||||
message (WARNING "submodule contrib/base64 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
else()
|
||||
set (BASE64_LIBRARY base64)
|
||||
set (USE_BASE64 1)
|
||||
endif()
|
||||
endif ()
|
||||
if (NOT USE_BASE64)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable base64")
|
||||
endif()
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
option (ENABLE_BROTLI "Enable brotli" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_BROTLI)
|
||||
if (NOT ENABLE_BROTLI)
|
||||
if (USE_INTERNAL_BROTLI_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal brotly library with ENABLE_BROTLI=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ${NOT_UNBUNDLED})
|
||||
if (UNBUNDLED)
|
||||
# Many system ship only dynamic brotly libraries, so we back off to bundled by default
|
||||
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ${USE_STATIC_LIBRARIES})
|
||||
else()
|
||||
option (USE_INTERNAL_BROTLI_LIBRARY "Set to FALSE to use system libbrotli library instead of bundled" ON)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/brotli/c/include/brotli/decode.h")
|
||||
if (USE_INTERNAL_BROTLI_LIBRARY)
|
||||
message (WARNING "submodule contrib/brotli is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot find internal brotli")
|
||||
set (USE_INTERNAL_BROTLI_LIBRARY 0)
|
||||
endif ()
|
||||
set (MISSING_INTERNAL_BROTLI_LIBRARY 1)
|
||||
|
@ -19,18 +30,18 @@ if(NOT USE_INTERNAL_BROTLI_LIBRARY)
|
|||
find_path(BROTLI_INCLUDE_DIR NAMES brotli/decode.h brotli/encode.h brotli/port.h brotli/types.h PATHS ${BROTLI_INCLUDE_PATHS})
|
||||
if(BROTLI_LIBRARY_DEC AND BROTLI_LIBRARY_ENC AND BROTLI_LIBRARY_COMMON)
|
||||
set(BROTLI_LIBRARY ${BROTLI_LIBRARY_DEC} ${BROTLI_LIBRARY_ENC} ${BROTLI_LIBRARY_COMMON})
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use system brotli")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (BROTLI_LIBRARY AND BROTLI_INCLUDE_DIR)
|
||||
set (USE_BROTLI 1)
|
||||
elseif (NOT MISSING_INTERNAL_BROTLI_LIBRARY)
|
||||
set (BROTLI_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/brotli/c/include)
|
||||
set (BROTLI_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/brotli/c/include")
|
||||
set (USE_INTERNAL_BROTLI_LIBRARY 1)
|
||||
set (BROTLI_LIBRARY brotli)
|
||||
set (USE_BROTLI 1)
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using brotli=${USE_BROTLI}: ${BROTLI_INCLUDE_DIR} : ${BROTLI_LIBRARY}")
|
||||
|
|
|
@ -1,15 +1,21 @@
|
|||
option (ENABLE_CAPNP "Enable Cap'n Proto" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_CAPNP)
|
||||
if (NOT ENABLE_CAPNP)
|
||||
if (USE_INTERNAL_CAPNP_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal capnproto library with ENABLE_CAPNP=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_CAPNP_LIBRARY "Set to FALSE to use system capnproto library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/capnproto/CMakeLists.txt")
|
||||
if(USE_INTERNAL_CAPNP_LIBRARY)
|
||||
message(WARNING "submodule contrib/capnproto is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message(${RECONFIGURE_MESSAGE_LEVEL} "cannot find internal capnproto")
|
||||
set(USE_INTERNAL_CAPNP_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_CAPNP_LIBRARY 1)
|
||||
set(USE_INTERNAL_CAPNP_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
# FIXME: refactor to use `add_library(… IMPORTED)` if possible.
|
||||
|
@ -18,17 +24,21 @@ if (NOT USE_INTERNAL_CAPNP_LIBRARY)
|
|||
find_library (CAPNP capnp)
|
||||
find_library (CAPNPC capnpc)
|
||||
|
||||
set (CAPNP_LIBRARIES ${CAPNPC} ${CAPNP} ${KJ})
|
||||
if(KJ AND CAPNP AND CAPNPC)
|
||||
set (CAPNP_LIBRARIES ${CAPNPC} ${CAPNP} ${KJ})
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system capnproto")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (CAPNP_LIBRARIES)
|
||||
set (USE_CAPNP 1)
|
||||
elseif(NOT MISSING_INTERNAL_CAPNP_LIBRARY)
|
||||
add_subdirectory(contrib/capnproto-cmake)
|
||||
|
||||
set (CAPNP_LIBRARIES capnpc)
|
||||
endif ()
|
||||
|
||||
if (CAPNP_LIBRARIES)
|
||||
set (USE_CAPNP 1)
|
||||
endif ()
|
||||
|
||||
set (USE_INTERNAL_CAPNP_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using capnp=${USE_CAPNP}: ${CAPNP_LIBRARIES}")
|
||||
|
|
|
@ -1,29 +1,33 @@
|
|||
option(ENABLE_CASSANDRA "Enable Cassandra" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_CASSANDRA)
|
||||
if (APPLE)
|
||||
SET(CMAKE_MACOSX_RPATH ON)
|
||||
endif()
|
||||
if (NOT ENABLE_CASSANDRA)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
||||
message (ERROR "submodule contrib/libuv is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
||||
message (ERROR "submodule contrib/cassandra is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
if (APPLE)
|
||||
set(CMAKE_MACOSX_RPATH ON)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
||||
message (ERROR "submodule contrib/libuv is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libuv needed for Cassandra")
|
||||
elseif (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
||||
message (ERROR "submodule contrib/cassandra is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal Cassandra")
|
||||
else()
|
||||
set (LIBUV_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
||||
set (CASSANDRA_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
set (LIBUV_LIBRARY uv_a)
|
||||
set (CASSANDRA_LIBRARY cassandra_static)
|
||||
else()
|
||||
set (LIBUV_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/libuv")
|
||||
set (CASSANDRA_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/cassandra/include/")
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
set (LIBUV_LIBRARY uv_a)
|
||||
set (CASSANDRA_LIBRARY cassandra_static)
|
||||
else()
|
||||
set (LIBUV_LIBRARY uv)
|
||||
set (CASSANDRA_LIBRARY cassandra)
|
||||
endif()
|
||||
set (USE_CASSANDRA 1)
|
||||
set (CASS_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
||||
|
||||
set (LIBUV_LIBRARY uv)
|
||||
set (CASSANDRA_LIBRARY cassandra)
|
||||
endif()
|
||||
|
||||
set (USE_CASSANDRA 1)
|
||||
set (CASS_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/cassandra")
|
||||
endif()
|
||||
|
||||
message (STATUS "Using cassandra=${USE_CASSANDRA}: ${CASSANDRA_INCLUDE_DIR} : ${CASSANDRA_LIBRARY}")
|
||||
|
|
|
@ -1,14 +1,40 @@
|
|||
find_program (CCACHE_FOUND ccache)
|
||||
if (CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache" OR CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
|
||||
set(COMPILER_MATCHES_CCACHE 1)
|
||||
else()
|
||||
set(COMPILER_MATCHES_CCACHE 0)
|
||||
endif()
|
||||
|
||||
if (CCACHE_FOUND AND NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache" AND NOT CMAKE_CXX_COMPILER MATCHES "ccache")
|
||||
if ((ENABLE_CCACHE OR NOT DEFINED ENABLE_CCACHE) AND NOT COMPILER_MATCHES_CCACHE)
|
||||
find_program (CCACHE_FOUND ccache)
|
||||
if (CCACHE_FOUND)
|
||||
set(ENABLE_CCACHE_BY_DEFAULT 1)
|
||||
else()
|
||||
set(ENABLE_CCACHE_BY_DEFAULT 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT CCACHE_FOUND AND NOT DEFINED ENABLE_CCACHE AND NOT COMPILER_MATCHES_CCACHE)
|
||||
message(WARNING "CCache is not found. We recommend setting it up if you build ClickHouse from source often. "
|
||||
"Setting it up will significantly reduce compilation time for 2nd and consequent builds")
|
||||
endif()
|
||||
|
||||
option(ENABLE_CCACHE "Speedup re-compilations using ccache" ${ENABLE_CCACHE_BY_DEFAULT})
|
||||
|
||||
if (NOT ENABLE_CCACHE)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (CCACHE_FOUND AND NOT COMPILER_MATCHES_CCACHE)
|
||||
execute_process(COMMAND ${CCACHE_FOUND} "-V" OUTPUT_VARIABLE CCACHE_VERSION)
|
||||
string(REGEX REPLACE "ccache version ([0-9\\.]+).*" "\\1" CCACHE_VERSION ${CCACHE_VERSION})
|
||||
|
||||
if (CCACHE_VERSION VERSION_GREATER "3.2.0" OR NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
|
||||
#message(STATUS "Using ${CCACHE_FOUND} ${CCACHE_VERSION}")
|
||||
message(STATUS "Using ${CCACHE_FOUND} ${CCACHE_VERSION}")
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_FOUND})
|
||||
set_property (GLOBAL PROPERTY RULE_LAUNCH_LINK ${CCACHE_FOUND})
|
||||
else ()
|
||||
message(STATUS "Not using ${CCACHE_FOUND} ${CCACHE_VERSION} bug: https://bugzilla.samba.org/show_bug.cgi?id=8118")
|
||||
message(${RECONFIGURE_MESSAGE_LEVEL} "Not using ${CCACHE_FOUND} ${CCACHE_VERSION} bug: https://bugzilla.samba.org/show_bug.cgi?id=8118")
|
||||
endif ()
|
||||
elseif (NOT CCACHE_FOUND AND NOT COMPILER_MATCHES_CCACHE)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use ccache")
|
||||
endif ()
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
option (ENABLE_CURL "Enable curl" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT ENABLE_CURL)
|
||||
if (USE_INTERNAL_CURL)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal curl with ENABLE_CURL=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_CURL "Use internal curl library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT USE_INTERNAL_CURL)
|
||||
find_package (CURL)
|
||||
if (NOT CURL_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system curl")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT CURL_FOUND)
|
||||
set (USE_INTERNAL_CURL 1)
|
||||
set (CURL_LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/curl")
|
||||
|
||||
# find_package(CURL) compatibility for the following packages that uses
|
||||
# find_package(CURL)/include(FindCURL):
|
||||
# - mariadb-connector-c
|
||||
# - aws-s3-cmake
|
||||
# - sentry-native
|
||||
set (CURL_FOUND ON CACHE BOOL "")
|
||||
set (CURL_ROOT_DIR ${CURL_LIBRARY_DIR} CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIR ${CURL_LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIRS ${CURL_LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_LIBRARY curl CACHE STRING "")
|
||||
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
||||
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using curl: ${CURL_INCLUDE_DIRS} : ${CURL_LIBRARIES}")
|
|
@ -1,41 +1,68 @@
|
|||
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT ${NOT_UNBUNDLED})
|
||||
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libcxx/CMakeLists.txt")
|
||||
message(WARNING "submodule contrib/libcxx is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT 0)
|
||||
if (NOT USE_LIBCXX)
|
||||
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal libcxx with USE_LIBCXX=OFF")
|
||||
endif()
|
||||
target_link_libraries(global-libs INTERFACE -l:libstdc++.a -l:libstdc++fs.a) # Always link these libraries as static
|
||||
target_link_libraries(global-libs INTERFACE ${EXCEPTION_HANDLING_LIBRARY})
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_LIBCXX "Use libc++ and libc++abi instead of libstdc++" ${NOT_UNBUNDLED})
|
||||
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT ${NOT_UNBUNDLED})
|
||||
option (USE_INTERNAL_LIBCXX_LIBRARY "Set to FALSE to use system libcxx and libcxxabi libraries instead of bundled" ${USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT})
|
||||
|
||||
if (USE_LIBCXX)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_DEBUG=0") # More checks in debug build.
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libcxx/CMakeLists.txt")
|
||||
if (USE_INTERNAL_LIBCXX_LIBRARY)
|
||||
message(WARNING "submodule contrib/libcxx is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libcxx")
|
||||
set(USE_INTERNAL_LIBCXX_LIBRARY 0)
|
||||
endif()
|
||||
set(USE_INTERNAL_LIBCXX_LIBRARY_DEFAULT 0)
|
||||
set(MISSING_INTERNAL_LIBCXX_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (NOT USE_INTERNAL_LIBCXX_LIBRARY)
|
||||
find_library (LIBCXX_LIBRARY c++)
|
||||
find_library (LIBCXXFS_LIBRARY c++fs)
|
||||
find_library (LIBCXXABI_LIBRARY c++abi)
|
||||
set (CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_LIBCPP_DEBUG=0") # More checks in debug build.
|
||||
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
if (NOT USE_INTERNAL_LIBCXX_LIBRARY)
|
||||
find_library (LIBCXX_LIBRARY c++)
|
||||
find_library (LIBCXXFS_LIBRARY c++fs)
|
||||
find_library (LIBCXXABI_LIBRARY c++abi)
|
||||
|
||||
target_link_libraries(global-libs INTERFACE ${EXCEPTION_HANDLING_LIBRARY})
|
||||
if(LIBCXX_LIBRARY AND LIBCXXABI_LIBRARY) # c++fs is now a part of the libc++
|
||||
set (HAVE_LIBCXX 1)
|
||||
else ()
|
||||
set (LIBCXX_LIBRARY cxx)
|
||||
set (LIBCXXABI_LIBRARY cxxabi)
|
||||
add_subdirectory(contrib/libcxxabi-cmake)
|
||||
add_subdirectory(contrib/libcxx-cmake)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system libcxx")
|
||||
endif()
|
||||
|
||||
# Exception handling library is embedded into libcxxabi.
|
||||
endif ()
|
||||
if(NOT LIBCXXFS_LIBRARY)
|
||||
set(LIBCXXFS_LIBRARY ${LIBCXX_LIBRARY})
|
||||
endif()
|
||||
|
||||
target_link_libraries(global-libs INTERFACE ${LIBCXX_LIBRARY} ${LIBCXXABI_LIBRARY} ${LIBCXXFS_LIBRARY})
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libc++")
|
||||
|
||||
target_link_libraries(global-libs INTERFACE ${EXCEPTION_HANDLING_LIBRARY})
|
||||
endif ()
|
||||
|
||||
if (NOT HAVE_LIBCXX AND NOT MISSING_INTERNAL_LIBCXX_LIBRARY)
|
||||
set (LIBCXX_LIBRARY cxx)
|
||||
set (LIBCXXABI_LIBRARY cxxabi)
|
||||
add_subdirectory(contrib/libcxxabi-cmake)
|
||||
add_subdirectory(contrib/libcxx-cmake)
|
||||
|
||||
# Exception handling library is embedded into libcxxabi.
|
||||
|
||||
set (HAVE_LIBCXX 1)
|
||||
set(USE_INTERNAL_LIBCXX_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (HAVE_LIBCXX)
|
||||
target_link_libraries(global-libs INTERFACE ${LIBCXX_LIBRARY} ${LIBCXXABI_LIBRARY} ${LIBCXXFS_LIBRARY})
|
||||
|
||||
message (STATUS "Using libcxx: ${LIBCXX_LIBRARY}")
|
||||
message (STATUS "Using libcxxfs: ${LIBCXXFS_LIBRARY}")
|
||||
message (STATUS "Using libcxxabi: ${LIBCXXABI_LIBRARY}")
|
||||
else ()
|
||||
else()
|
||||
target_link_libraries(global-libs INTERFACE -l:libstdc++.a -l:libstdc++fs.a) # Always link these libraries as static
|
||||
target_link_libraries(global-libs INTERFACE ${EXCEPTION_HANDLING_LIBRARY})
|
||||
endif ()
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
if (${ENABLE_LIBRARIES} AND ${ENABLE_KRB5})
|
||||
set (DEFAULT_ENABLE_CYRUS_SASL 1)
|
||||
else()
|
||||
set (DEFAULT_ENABLE_CYRUS_SASL 0)
|
||||
endif()
|
||||
|
||||
OPTION(ENABLE_CYRUS_SASL "Enable cyrus-sasl" ${DEFAULT_ENABLE_CYRUS_SASL})
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cyrus-sasl/README")
|
||||
message (WARNING "submodule contrib/cyrus-sasl is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (ENABLE_CYRUS_SASL 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_CYRUS_SASL)
|
||||
|
||||
set (USE_CYRUS_SASL 1)
|
||||
set (CYRUS_SASL_LIBRARY sasl2)
|
||||
|
||||
set (CYRUS_SASL_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/cyrus-sasl/include")
|
||||
|
||||
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using cyrus-sasl: krb5=${USE_KRB5}: ${CYRUS_SASL_INCLUDE_DIR} : ${CYRUS_SASL_LIBRARY}")
|
|
@ -1,19 +1,24 @@
|
|||
if(NOT ARCH_ARM AND NOT OS_FREEBSD AND NOT OS_DARWIN)
|
||||
option(ENABLE_FASTOPS "Enable fast vectorized mathematical functions library by Mikhail Parakhin" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_FASTOPS)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Fastops library is not supported on ARM, FreeBSD and Darwin")
|
||||
endif()
|
||||
|
||||
if(ENABLE_FASTOPS)
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/fastops/fastops/fastops.h")
|
||||
message(WARNING "submodule contrib/fastops is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set(MISSING_INTERNAL_FASTOPS_LIBRARY 1)
|
||||
endif()
|
||||
if(NOT MISSING_INTERNAL_FASTOPS_LIBRARY)
|
||||
set(USE_FASTOPS 1)
|
||||
set(FASTOPS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/fastops/)
|
||||
set(FASTOPS_LIBRARY fastops)
|
||||
endif()
|
||||
else()
|
||||
if(NOT ENABLE_FASTOPS)
|
||||
set(USE_FASTOPS 0)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/fastops/fastops/fastops.h")
|
||||
message(WARNING "submodule contrib/fastops is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal fastops library")
|
||||
set(MISSING_INTERNAL_FASTOPS_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if(NOT MISSING_INTERNAL_FASTOPS_LIBRARY)
|
||||
set(USE_FASTOPS 1)
|
||||
set(FASTOPS_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/fastops/)
|
||||
set(FASTOPS_LIBRARY fastops)
|
||||
endif()
|
||||
|
||||
message(STATUS "Using fastops=${USE_FASTOPS}: ${FASTOPS_INCLUDE_DIR} : ${FASTOPS_LIBRARY}")
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
# Check if gperf was installed
|
||||
find_program(GPERF gperf)
|
||||
if(GPERF)
|
||||
option(ENABLE_GPERF "Use gperf function hash generator tool" ${ENABLE_LIBRARIES})
|
||||
if(NOT DEFINED ENABLE_GPERF OR ENABLE_GPERF)
|
||||
# Check if gperf was installed
|
||||
find_program(GPERF gperf)
|
||||
if(GPERF)
|
||||
option(ENABLE_GPERF "Use gperf function hash generator tool" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (ENABLE_GPERF)
|
||||
if(NOT GPERF)
|
||||
message(FATAL_ERROR "Could not find the program gperf")
|
||||
|
|
|
@ -1,26 +1,45 @@
|
|||
option (ENABLE_GRPC "Use gRPC" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_GRPC)
|
||||
option (USE_INTERNAL_GRPC_LIBRARY "Set to FALSE to use system gRPC library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT ENABLE_GRPC)
|
||||
if (USE_INTERNAL_GRPC_LIBRARY)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/include/grpc++/grpc++.h")
|
||||
message(WARNING "submodule contrib/grpc is missing. To fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
elif (NOT USE_PROTOBUF)
|
||||
message(WARNING "gRPC requires protobuf which is disabled")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
else()
|
||||
set (GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc/include")
|
||||
set (GRPC_LIBRARY "libgrpc++")
|
||||
set (USE_GRPC ON)
|
||||
endif()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal gRPC library with ENABLE_GRPC=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_GRPC_LIBRARY
|
||||
"Set to FALSE to use system gRPC library instead of bundled. (Experimental. Set to OFF on your own risk)"
|
||||
${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT USE_INTERNAL_GRPC_LIBRARY)
|
||||
find_package(grpc)
|
||||
if (NOT GRPC_FOUND)
|
||||
find_path(GRPC_INCLUDE_DIR grpcpp/grpcpp.h)
|
||||
find_library(GRPC_LIBRARY grpc++)
|
||||
endif ()
|
||||
|
||||
if (GRPC_INCLUDE_DIR AND GRPC_LIBRARY)
|
||||
set (USE_GRPC ON)
|
||||
else()
|
||||
find_package(grpc)
|
||||
if (GRPC_INCLUDE_DIR AND GRPC_LIBRARY)
|
||||
set (USE_GRPC ON)
|
||||
endif()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system gRPC")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message(STATUS "Using gRPC=${USE_GRPC}: ${GRPC_INCLUDE_DIR} : ${GRPC_LIBRARY}")
|
||||
if (NOT USE_GRPC)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/grpc/include/grpc++/grpc++.h")
|
||||
message (WARNING "submodule contrib/grpc is missing. To fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal gRPC")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
elseif (NOT USE_PROTOBUF)
|
||||
message (WARNING "gRPC requires protobuf which is disabled")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Will not use internal gRPC without protobuf")
|
||||
set (USE_INTERNAL_GRPC_LIBRARY OFF)
|
||||
else()
|
||||
set (GRPC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/grpc/include")
|
||||
set (GRPC_LIBRARY "libgrpc++")
|
||||
set (USE_GRPC ON)
|
||||
set (USE_INTERNAL_GRPC_LIBRARY ON)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message (STATUS "Using gRPC=${USE_GRPC}: ${GRPC_INCLUDE_DIR} : ${GRPC_LIBRARY}")
|
||||
|
|
|
@ -1,22 +1,30 @@
|
|||
option (ENABLE_GTEST_LIBRARY "Enable gtest library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_GTEST_LIBRARY)
|
||||
if (NOT ENABLE_GTEST_LIBRARY)
|
||||
if(USE_INTERNAL_GTEST_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal Google Test when ENABLE_GTEST_LIBRARY=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_GTEST_LIBRARY "Set to FALSE to use system Google Test instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest/CMakeLists.txt")
|
||||
if (USE_INTERNAL_GTEST_LIBRARY)
|
||||
message (WARNING "submodule contrib/googletest is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal gtest")
|
||||
set (USE_INTERNAL_GTEST_LIBRARY 0)
|
||||
endif ()
|
||||
set (MISSING_INTERNAL_GTEST_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
|
||||
if(NOT USE_INTERNAL_GTEST_LIBRARY)
|
||||
# TODO: autodetect of GTEST_SRC_DIR by EXISTS /usr/src/googletest/CMakeLists.txt
|
||||
if(NOT GTEST_SRC_DIR)
|
||||
find_package(GTest)
|
||||
if (NOT GTEST_INCLUDE_DIRS)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system Google Test")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -26,12 +34,13 @@ if (NOT GTEST_SRC_DIR AND NOT GTEST_INCLUDE_DIRS AND NOT MISSING_INTERNAL_GTEST_
|
|||
set (GTEST_LIBRARIES gtest)
|
||||
set (GTEST_BOTH_LIBRARIES ${GTEST_MAIN_LIBRARIES} ${GTEST_LIBRARIES})
|
||||
set (GTEST_INCLUDE_DIRS ${ClickHouse_SOURCE_DIR}/contrib/googletest/googletest)
|
||||
elseif(USE_INTERNAL_GTEST_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Wouldn't use internal Google Test library")
|
||||
set (USE_INTERNAL_GTEST_LIBRARY 0)
|
||||
endif ()
|
||||
|
||||
if((GTEST_INCLUDE_DIRS AND GTEST_BOTH_LIBRARIES) OR GTEST_SRC_DIR)
|
||||
set(USE_GTEST 1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using gtest=${USE_GTEST}: ${GTEST_INCLUDE_DIRS} : ${GTEST_BOTH_LIBRARIES} : ${GTEST_SRC_DIR}")
|
||||
|
|
|
@ -1,28 +1,39 @@
|
|||
option (ENABLE_H3 "Enable H3" ${ENABLE_LIBRARIES})
|
||||
if (ENABLE_H3)
|
||||
if(NOT ENABLE_H3)
|
||||
if(USE_INTERNAL_H3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal h3 library with ENABLE_H3=OFF")
|
||||
endif ()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_H3_LIBRARY "Set to FALSE to use system h3 library instead of bundled" ${NOT_UNBUNDLED})
|
||||
option(USE_INTERNAL_H3_LIBRARY "Set to FALSE to use system h3 library instead of bundled"
|
||||
ON) # we are not aware of any distribution that provides h3 package
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include/h3Index.h")
|
||||
if(USE_INTERNAL_H3_LIBRARY)
|
||||
message(WARNING "submodule contrib/h3 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message(WARNING "submodule contrib/h3 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message(${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal h3 library")
|
||||
set(USE_INTERNAL_H3_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_H3_LIBRARY 1)
|
||||
set(USE_INTERNAL_H3_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_H3_LIBRARY)
|
||||
set (H3_LIBRARY h3)
|
||||
set (H3_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include)
|
||||
elseif (NOT MISSING_INTERNAL_H3_LIBRARY)
|
||||
find_library (H3_LIBRARY h3)
|
||||
find_path (H3_INCLUDE_DIR NAMES h3/h3api.h PATHS ${H3_INCLUDE_PATHS})
|
||||
endif ()
|
||||
if(NOT USE_INTERNAL_H3_LIBRARY)
|
||||
find_library(H3_LIBRARY h3)
|
||||
find_path(H3_INCLUDE_DIR NAMES h3/h3api.h PATHS ${H3_INCLUDE_PATHS})
|
||||
|
||||
if(NOT H3_LIBRARY OR NOT H3_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system h3 library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (H3_LIBRARY AND H3_INCLUDE_DIR)
|
||||
set (USE_H3 1)
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
elseif(NOT MISSING_INTERNAL_H3_LIBRARY)
|
||||
set (H3_LIBRARY h3)
|
||||
set (H3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/h3/src/h3lib/include")
|
||||
set (USE_H3 1)
|
||||
set (USE_INTERNAL_H3_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
message (STATUS "Using h3=${USE_H3}: ${H3_INCLUDE_DIR} : ${H3_LIBRARY}")
|
||||
|
|
|
@ -1,34 +1,45 @@
|
|||
if(NOT ARCH_ARM AND NOT OS_FREEBSD AND NOT APPLE AND USE_PROTOBUF)
|
||||
option(ENABLE_HDFS "Enable HDFS" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_HDFS OR USE_INTERNAL_HDFS3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use HDFS3 with current configuration")
|
||||
endif()
|
||||
|
||||
if(ENABLE_HDFS)
|
||||
option(USE_INTERNAL_HDFS3_LIBRARY "Set to FALSE to use system HDFS3 instead of bundled" ${NOT_UNBUNDLED})
|
||||
if(NOT ENABLE_HDFS)
|
||||
if(USE_INTERNAL_HDFS3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal HDFS3 library with ENABLE_HDFS3=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_HDFS3_LIBRARY "Set to FALSE to use system HDFS3 instead of bundled (experimental - set to OFF on your own risk)"
|
||||
ON) # We don't know any linux distribution with package for it
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libhdfs3/include/hdfs/hdfs.h")
|
||||
if(USE_INTERNAL_HDFS3_LIBRARY)
|
||||
message(WARNING "submodule contrib/libhdfs3 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message(WARNING "submodule contrib/libhdfs3 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal HDFS3 library")
|
||||
set(USE_INTERNAL_HDFS3_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_HDFS3_LIBRARY 1)
|
||||
set(USE_INTERNAL_HDFS3_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
if(NOT USE_INTERNAL_HDFS3_LIBRARY)
|
||||
find_library(HDFS3_LIBRARY hdfs3)
|
||||
find_path(HDFS3_INCLUDE_DIR NAMES hdfs/hdfs.h PATHS ${HDFS3_INCLUDE_PATHS})
|
||||
if(NOT HDFS3_LIBRARY OR NOT HDFS3_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot find system HDFS3 library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(HDFS3_LIBRARY AND HDFS3_INCLUDE_DIR)
|
||||
set(USE_HDFS 1)
|
||||
elseif(NOT MISSING_INTERNAL_HDFS3_LIBRARY AND LIBGSASL_LIBRARY AND LIBXML2_LIBRARY)
|
||||
elseif(NOT MISSING_INTERNAL_HDFS3_LIBRARY AND LIBGSASL_LIBRARY AND LIBXML2_LIBRARIES)
|
||||
set(HDFS3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libhdfs3/include")
|
||||
set(HDFS3_LIBRARY hdfs3)
|
||||
set(USE_INTERNAL_HDFS3_LIBRARY 1)
|
||||
set(USE_HDFS 1)
|
||||
else()
|
||||
set(USE_INTERNAL_HDFS3_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannout enable HDFS3")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using hdfs3=${USE_HDFS}: ${HDFS3_INCLUDE_DIR} : ${HDFS3_LIBRARY}")
|
||||
|
|
|
@ -4,13 +4,20 @@ else ()
|
|||
option(ENABLE_ICU "Enable ICU" 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_ICU)
|
||||
if (NOT ENABLE_ICU)
|
||||
if(USE_INTERNAL_ICU_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal icu library with ENABLE_ICU=OFF")
|
||||
endif()
|
||||
message(STATUS "Build without ICU (support for collations and charset conversion functions will be disabled)")
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_ICU_LIBRARY "Set to FALSE to use system ICU library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/icu/icu4c/LICENSE")
|
||||
if (USE_INTERNAL_ICU_LIBRARY)
|
||||
message (WARNING "submodule contrib/icu is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal ICU")
|
||||
set (USE_INTERNAL_ICU_LIBRARY 0)
|
||||
endif ()
|
||||
set (MISSING_INTERNAL_ICU_LIBRARY 1)
|
||||
|
@ -24,6 +31,8 @@ if(NOT USE_INTERNAL_ICU_LIBRARY)
|
|||
#set (ICU_LIBRARIES ${ICU_I18N_LIBRARY} ${ICU_UC_LIBRARY} ${ICU_DATA_LIBRARY} CACHE STRING "")
|
||||
if(ICU_FOUND)
|
||||
set(USE_ICU 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system ICU")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
|
@ -35,8 +44,6 @@ elseif (NOT MISSING_INTERNAL_ICU_LIBRARY)
|
|||
set (USE_ICU 1)
|
||||
endif ()
|
||||
|
||||
endif()
|
||||
|
||||
if(USE_ICU)
|
||||
message(STATUS "Using icu=${USE_ICU}: ${ICU_INCLUDE_DIR} : ${ICU_LIBRARIES}")
|
||||
else()
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
OPTION(ENABLE_KRB5 "Enable krb5" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/krb5/README")
|
||||
message (WARNING "submodule contrib/krb5 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (ENABLE_KRB5 0)
|
||||
endif ()
|
||||
|
||||
if (NOT CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
message (WARNING "krb5 disabled in non-Linux environments")
|
||||
set (ENABLE_KRB5 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_KRB5)
|
||||
|
||||
set (USE_KRB5 1)
|
||||
set (KRB5_LIBRARY krb5)
|
||||
|
||||
set (KRB5_INCLUDE_DIR
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/krb5/src/include"
|
||||
"${ClickHouse_BINARY_DIR}/contrib/krb5-cmake/include"
|
||||
)
|
||||
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using krb5=${USE_KRB5}: ${KRB5_INCLUDE_DIR} : ${KRB5_LIBRARY}")
|
|
@ -1,84 +1,101 @@
|
|||
if (UNBUNDLED AND USE_STATIC_LIBRARIES)
|
||||
set (ENABLE_LDAP OFF CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
option (ENABLE_LDAP "Enable LDAP" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_LDAP)
|
||||
option (USE_INTERNAL_LDAP_LIBRARY "Set to FALSE to use system *LDAP library instead of bundled" ${NOT_UNBUNDLED})
|
||||
if (NOT ENABLE_LDAP)
|
||||
if(USE_INTERNAL_LDAP_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal LDAP library with ENABLE_LDAP=OFF")
|
||||
endif ()
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/openldap/README")
|
||||
if (USE_INTERNAL_LDAP_LIBRARY)
|
||||
message (WARNING "Submodule contrib/openldap is missing. To fix try running:\n git submodule update --init --recursive")
|
||||
endif ()
|
||||
option (USE_INTERNAL_LDAP_LIBRARY "Set to FALSE to use system *LDAP library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 0)
|
||||
set (MISSING_INTERNAL_LDAP_LIBRARY 1)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/openldap/README")
|
||||
if (USE_INTERNAL_LDAP_LIBRARY)
|
||||
message (WARNING "Submodule contrib/openldap is missing. To fix try running:\n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal LDAP library")
|
||||
endif ()
|
||||
|
||||
set (OPENLDAP_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
|
||||
set (OPENLDAP_USE_REENTRANT_LIBS 1)
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 0)
|
||||
set (MISSING_INTERNAL_LDAP_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_LDAP_LIBRARY)
|
||||
if (OPENLDAP_USE_STATIC_LIBS)
|
||||
message (WARNING "Unable to use external static OpenLDAP libraries, falling back to the bundled version.")
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 1)
|
||||
else ()
|
||||
if (APPLE AND NOT OPENLDAP_ROOT_DIR)
|
||||
set (OPENLDAP_ROOT_DIR "/usr/local/opt/openldap")
|
||||
endif ()
|
||||
set (OPENLDAP_USE_STATIC_LIBS ${USE_STATIC_LIBRARIES})
|
||||
set (OPENLDAP_USE_REENTRANT_LIBS 1)
|
||||
|
||||
find_package (OpenLDAP)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENLDAP_FOUND AND NOT MISSING_INTERNAL_LDAP_LIBRARY)
|
||||
string (TOLOWER "${CMAKE_SYSTEM_NAME}" _system_name)
|
||||
string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _system_processor)
|
||||
|
||||
if (
|
||||
"${_system_processor}" STREQUAL "amd64" OR
|
||||
"${_system_processor}" STREQUAL "x64"
|
||||
)
|
||||
set (_system_processor "x86_64")
|
||||
elseif (
|
||||
"${_system_processor}" STREQUAL "arm64"
|
||||
)
|
||||
set (_system_processor "aarch64")
|
||||
if (NOT USE_INTERNAL_LDAP_LIBRARY)
|
||||
if (OPENLDAP_USE_STATIC_LIBS)
|
||||
message (WARNING "Unable to use external static OpenLDAP libraries, falling back to the bundled version.")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Unable to use external OpenLDAP")
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 1)
|
||||
else ()
|
||||
if (APPLE AND NOT OPENLDAP_ROOT_DIR)
|
||||
set (OPENLDAP_ROOT_DIR "/usr/local/opt/openldap")
|
||||
endif ()
|
||||
|
||||
if (
|
||||
( "${_system_name}" STREQUAL "linux" AND "${_system_processor}" STREQUAL "x86_64" ) OR
|
||||
( "${_system_name}" STREQUAL "linux" AND "${_system_processor}" STREQUAL "aarch64" ) OR
|
||||
( "${_system_name}" STREQUAL "freebsd" AND "${_system_processor}" STREQUAL "x86_64" ) OR
|
||||
( "${_system_name}" STREQUAL "darwin" AND "${_system_processor}" STREQUAL "x86_64" )
|
||||
)
|
||||
set (_ldap_supported_platform TRUE)
|
||||
endif ()
|
||||
find_package (OpenLDAP)
|
||||
|
||||
if (NOT _ldap_supported_platform)
|
||||
message (WARNING "LDAP support using the bundled library is not implemented for ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} platform.")
|
||||
elseif (NOT USE_SSL)
|
||||
message (WARNING "LDAP support using the bundled library is not possible if SSL is not used.")
|
||||
else ()
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 1)
|
||||
set (OPENLDAP_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/openldap")
|
||||
set (OPENLDAP_INCLUDE_DIRS
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/openldap-cmake/${_system_name}_${_system_processor}/include"
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/openldap/include"
|
||||
)
|
||||
# Below, 'ldap'/'ldap_r' and 'lber' will be resolved to
|
||||
# the targets defined in contrib/openldap-cmake/CMakeLists.txt
|
||||
if (OPENLDAP_USE_REENTRANT_LIBS)
|
||||
set (OPENLDAP_LDAP_LIBRARY "ldap_r")
|
||||
else ()
|
||||
set (OPENLDAP_LDAP_LIBRARY "ldap")
|
||||
endif()
|
||||
set (OPENLDAP_LBER_LIBRARY "lber")
|
||||
set (OPENLDAP_LIBRARIES ${OPENLDAP_LDAP_LIBRARY} ${OPENLDAP_LBER_LIBRARY})
|
||||
set (OPENLDAP_FOUND 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (OPENLDAP_FOUND)
|
||||
set (USE_LDAP 1)
|
||||
if (NOT OPENLDAP_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system OpenLDAP")
|
||||
endif()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENLDAP_FOUND AND NOT MISSING_INTERNAL_LDAP_LIBRARY)
|
||||
string (TOLOWER "${CMAKE_SYSTEM_NAME}" _system_name)
|
||||
string (TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" _system_processor)
|
||||
|
||||
if (
|
||||
"${_system_processor}" STREQUAL "amd64" OR
|
||||
"${_system_processor}" STREQUAL "x64"
|
||||
)
|
||||
set (_system_processor "x86_64")
|
||||
elseif (
|
||||
"${_system_processor}" STREQUAL "arm64"
|
||||
)
|
||||
set (_system_processor "aarch64")
|
||||
endif ()
|
||||
|
||||
if (
|
||||
( "${_system_name}" STREQUAL "linux" AND "${_system_processor}" STREQUAL "x86_64" ) OR
|
||||
( "${_system_name}" STREQUAL "linux" AND "${_system_processor}" STREQUAL "aarch64" ) OR
|
||||
( "${_system_name}" STREQUAL "freebsd" AND "${_system_processor}" STREQUAL "x86_64" ) OR
|
||||
( "${_system_name}" STREQUAL "darwin" AND "${_system_processor}" STREQUAL "x86_64" )
|
||||
)
|
||||
set (_ldap_supported_platform TRUE)
|
||||
endif ()
|
||||
|
||||
if (NOT _ldap_supported_platform)
|
||||
message (WARNING "LDAP support using the bundled library is not implemented for ${CMAKE_SYSTEM_NAME} ${CMAKE_SYSTEM_PROCESSOR} platform.")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable LDAP support")
|
||||
elseif (NOT USE_SSL)
|
||||
message (WARNING "LDAP support using the bundled library is not possible if SSL is not used.")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot enable LDAP support")
|
||||
else ()
|
||||
set (USE_INTERNAL_LDAP_LIBRARY 1)
|
||||
set (OPENLDAP_ROOT_DIR "${ClickHouse_SOURCE_DIR}/contrib/openldap")
|
||||
set (OPENLDAP_INCLUDE_DIRS
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/openldap-cmake/${_system_name}_${_system_processor}/include"
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/openldap/include"
|
||||
)
|
||||
# Below, 'ldap'/'ldap_r' and 'lber' will be resolved to
|
||||
# the targets defined in contrib/openldap-cmake/CMakeLists.txt
|
||||
if (OPENLDAP_USE_REENTRANT_LIBS)
|
||||
set (OPENLDAP_LDAP_LIBRARY "ldap_r")
|
||||
else ()
|
||||
set (OPENLDAP_LDAP_LIBRARY "ldap")
|
||||
endif()
|
||||
set (OPENLDAP_LBER_LIBRARY "lber")
|
||||
set (OPENLDAP_LIBRARIES ${OPENLDAP_LDAP_LIBRARY} ${OPENLDAP_LBER_LIBRARY})
|
||||
set (OPENLDAP_FOUND 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (OPENLDAP_FOUND)
|
||||
set (USE_LDAP 1)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using ldap=${USE_LDAP}: ${OPENLDAP_INCLUDE_DIRS} : ${OPENLDAP_LIBRARIES}")
|
||||
|
|
|
@ -1,12 +1,23 @@
|
|||
option(ENABLE_GSASL_LIBRARY "Enable gsasl library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_GSASL_LIBRARY)
|
||||
if (NOT ENABLE_GSASL_LIBRARY)
|
||||
if(USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal libgsasl library with ENABLE_GSASL_LIBRARY=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ${NOT_UNBUNDLED})
|
||||
if (UNBUNDLED)
|
||||
# when USE_STATIC_LIBRARIES we usually need to pick up hell a lot of dependencies for libgsasl
|
||||
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ${USE_STATIC_LIBRARIES})
|
||||
else()
|
||||
option (USE_INTERNAL_LIBGSASL_LIBRARY "Set to FALSE to use system libgsasl library instead of bundled" ON)
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src/gsasl.h")
|
||||
if (USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||
message (WARNING "submodule contrib/libgsasl is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libgsasl")
|
||||
set (USE_INTERNAL_LIBGSASL_LIBRARY 0)
|
||||
endif ()
|
||||
set (MISSING_INTERNAL_LIBGSASL_LIBRARY 1)
|
||||
|
@ -14,12 +25,15 @@ endif ()
|
|||
|
||||
if (NOT USE_INTERNAL_LIBGSASL_LIBRARY)
|
||||
find_library (LIBGSASL_LIBRARY gsasl)
|
||||
find_path (LIBGSASL_INCLUDE_DIR NAMES gsasl.h PATHS ${LIBGSASL_INCLUDE_PATHS})
|
||||
find_path (LIBGSASL_INCLUDE_DIR NAMES gsasl.h PATHS ${LIBGSASL_INCLUDE_PATHS})
|
||||
if (NOT LIBGSASL_LIBRARY OR NOT LIBGSASL_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system libgsasl")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
||||
elseif (NOT MISSING_INTERNAL_LIBGSASL_LIBRARY)
|
||||
set (LIBGSASL_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src ${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include)
|
||||
set (LIBGSASL_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/src" "${ClickHouse_SOURCE_DIR}/contrib/libgsasl/linux_x86_64/include")
|
||||
set (USE_INTERNAL_LIBGSASL_LIBRARY 1)
|
||||
set (LIBGSASL_LIBRARY libgsasl)
|
||||
endif ()
|
||||
|
@ -28,6 +42,4 @@ if(LIBGSASL_LIBRARY AND LIBGSASL_INCLUDE_DIR)
|
|||
set (USE_LIBGSASL 1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using libgsasl=${USE_LIBGSASL}: ${LIBGSASL_INCLUDE_DIR} : ${LIBGSASL_LIBRARY}")
|
||||
|
|
|
@ -3,6 +3,7 @@ option (USE_INTERNAL_LIBXML2_LIBRARY "Set to FALSE to use system libxml2 library
|
|||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/libxml2/libxml.h")
|
||||
if (USE_INTERNAL_LIBXML2_LIBRARY)
|
||||
message (WARNING "submodule contrib/libxml2 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal libxml")
|
||||
set (USE_INTERNAL_LIBXML2_LIBRARY 0)
|
||||
endif ()
|
||||
set (MISSING_INTERNAL_LIBXML2_LIBRARY 1)
|
||||
|
@ -12,13 +13,22 @@ if (NOT USE_INTERNAL_LIBXML2_LIBRARY)
|
|||
find_package (LibXml2)
|
||||
#find_library (LIBXML2_LIBRARY libxml2)
|
||||
#find_path (LIBXML2_INCLUDE_DIR NAMES libxml.h PATHS ${LIBXML2_INCLUDE_PATHS})
|
||||
|
||||
if (NOT LIBXML2_LIBRARY OR NOT LIBXML2_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system libxml2")
|
||||
endif ()
|
||||
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
find_package(LibLZMA)
|
||||
set (LIBXML2_LIBRARIES ${LIBXML2_LIBRARIES} ${LIBLZMA_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (LIBXML2_LIBRARY AND LIBXML2_INCLUDE_DIR)
|
||||
elseif (NOT MISSING_INTERNAL_LIBXML2_LIBRARY)
|
||||
set (LIBXML2_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libxml2/include ${ClickHouse_SOURCE_DIR}/contrib/libxml2-cmake/linux_x86_64/include)
|
||||
set (USE_INTERNAL_LIBXML2_LIBRARY 1)
|
||||
set (LIBXML2_LIBRARY libxml2)
|
||||
set (LIBXML2_LIBRARIES libxml2)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using libxml2: ${LIBXML2_INCLUDE_DIR} : ${LIBXML2_LIBRARY}")
|
||||
message (STATUS "Using libxml2: ${LIBXML2_INCLUDE_DIR} : ${LIBXML2_LIBRARIES}")
|
||||
|
|
|
@ -1,79 +1,98 @@
|
|||
# Broken in macos. TODO: update clang, re-test, enable
|
||||
if (NOT APPLE)
|
||||
option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile_expressions' option for query execution" ${ENABLE_LIBRARIES})
|
||||
if (APPLE OR SPLIT_SHARED_LIBRARIES OR NOT ARCH_AMD64)
|
||||
set (ENABLE_EMBEDDED_COMPILER OFF CACHE INTERNAL "")
|
||||
endif()
|
||||
|
||||
option (ENABLE_EMBEDDED_COMPILER "Set to TRUE to enable support for 'compile_expressions' option for query execution" ${ENABLE_LIBRARIES})
|
||||
# Broken in macos. TODO: update clang, re-test, enable on Apple
|
||||
if (ENABLE_EMBEDDED_COMPILER AND NOT SPLIT_SHARED_LIBRARIES AND ARCH_AMD64 AND NOT (SANITIZE STREQUAL "undefined"))
|
||||
option (USE_INTERNAL_LLVM_LIBRARY "Use bundled or system LLVM library." ${NOT_UNBUNDLED})
|
||||
endif()
|
||||
|
||||
if (NOT ENABLE_EMBEDDED_COMPILER)
|
||||
if(USE_INTERNAL_LLVM_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal LLVM library with ENABLE_EMBEDDED_COMPILER=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/CMakeLists.txt")
|
||||
if (USE_INTERNAL_LLVM_LIBRARY)
|
||||
message (WARNING "submodule contrib/llvm is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't fidd internal LLVM library")
|
||||
endif()
|
||||
set (MISSING_INTERNAL_LLVM_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_EMBEDDED_COMPILER)
|
||||
if (USE_INTERNAL_LLVM_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/llvm is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_LLVM_LIBRARY 0)
|
||||
endif ()
|
||||
if (NOT USE_INTERNAL_LLVM_LIBRARY)
|
||||
set (LLVM_PATHS "/usr/local/lib/llvm")
|
||||
|
||||
if (NOT USE_INTERNAL_LLVM_LIBRARY)
|
||||
set (LLVM_PATHS "/usr/local/lib/llvm")
|
||||
|
||||
foreach(llvm_v 9 8)
|
||||
if (NOT LLVM_FOUND)
|
||||
find_package (LLVM ${llvm_v} CONFIG PATHS ${LLVM_PATHS})
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
if (LLVM_FOUND)
|
||||
# Remove dynamically-linked zlib and libedit from LLVM's dependencies:
|
||||
set_target_properties(LLVMSupport PROPERTIES INTERFACE_LINK_LIBRARIES "-lpthread;LLVMDemangle;${ZLIB_LIBRARIES}")
|
||||
set_target_properties(LLVMLineEditor PROPERTIES INTERFACE_LINK_LIBRARIES "LLVMSupport")
|
||||
|
||||
option(LLVM_HAS_RTTI "Enable if LLVM was build with RTTI enabled" ON)
|
||||
set (USE_EMBEDDED_COMPILER 1)
|
||||
else()
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
endif()
|
||||
|
||||
if (LLVM_FOUND AND OS_LINUX AND USE_LIBCXX)
|
||||
message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY is not set but the LLVM library from OS packages in Linux is incompatible with libc++ ABI. LLVM Will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
foreach(llvm_v 9 8)
|
||||
if (NOT LLVM_FOUND)
|
||||
find_package (LLVM ${llvm_v} CONFIG PATHS ${LLVM_PATHS})
|
||||
endif ()
|
||||
else()
|
||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
message(WARNING "Option ENABLE_EMBEDDED_COMPILER is set but LLVM library cannot build if build directory is the same as source directory.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (SPLIT_SHARED_LIBRARIES)
|
||||
# llvm-tablegen cannot find shared libraries that we build. Probably can be easily fixed.
|
||||
message(WARNING "Option ENABLE_EMBEDDED_COMPILER is not compatible with SPLIT_SHARED_LIBRARIES. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (NOT ARCH_AMD64)
|
||||
# It's not supported yet, but you can help.
|
||||
message(WARNING "Option ENABLE_EMBEDDED_COMPILER is only available for x86_64. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (SANITIZE STREQUAL "undefined")
|
||||
# llvm-tblgen, that is used during LLVM build, doesn't work with UBSan.
|
||||
message(WARNING "Option ENABLE_EMBEDDED_COMPILER does not work with UBSan, because 'llvm-tblgen' tool from LLVM has undefined behaviour. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
else ()
|
||||
set (LLVM_FOUND 1)
|
||||
set (USE_EMBEDDED_COMPILER 1)
|
||||
set (LLVM_VERSION "9.0.0bundled")
|
||||
set (LLVM_INCLUDE_DIRS
|
||||
${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/include
|
||||
${ClickHouse_BINARY_DIR}/contrib/llvm/llvm/include
|
||||
)
|
||||
set (LLVM_LIBRARY_DIRS ${ClickHouse_BINARY_DIR}/contrib/llvm/llvm)
|
||||
endif()
|
||||
endif()
|
||||
endforeach ()
|
||||
|
||||
if (LLVM_FOUND)
|
||||
message(STATUS "LLVM include Directory: ${LLVM_INCLUDE_DIRS}")
|
||||
message(STATUS "LLVM library Directory: ${LLVM_LIBRARY_DIRS}")
|
||||
message(STATUS "LLVM C++ compiler flags: ${LLVM_CXXFLAGS}")
|
||||
# Remove dynamically-linked zlib and libedit from LLVM's dependencies:
|
||||
set_target_properties(LLVMSupport PROPERTIES INTERFACE_LINK_LIBRARIES "-lpthread;LLVMDemangle;${ZLIB_LIBRARIES}")
|
||||
set_target_properties(LLVMLineEditor PROPERTIES INTERFACE_LINK_LIBRARIES "LLVMSupport")
|
||||
|
||||
option(LLVM_HAS_RTTI "Enable if LLVM was build with RTTI enabled" ON)
|
||||
set (USE_EMBEDDED_COMPILER 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system LLVM")
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
endif()
|
||||
|
||||
if (LLVM_FOUND AND OS_LINUX AND USE_LIBCXX AND NOT FORCE_LLVM_WITH_LIBCXX)
|
||||
message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY is not set but the LLVM library from OS packages "
|
||||
"in Linux is incompatible with libc++ ABI. LLVM Will be disabled. Force: -DFORCE_LLVM_WITH_LIBCXX=ON")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Unsupported LLVM configuration, cannot enable LLVM")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
endif ()
|
||||
endif()
|
||||
|
||||
if(NOT LLVM_FOUND AND NOT MISSING_INTERNAL_LLVM_LIBRARY)
|
||||
if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR)
|
||||
message(WARNING "Option ENABLE_EMBEDDED_COMPILER is set but internal LLVM library cannot build if build directory is the same as source directory.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (SPLIT_SHARED_LIBRARIES)
|
||||
# llvm-tablegen cannot find shared libraries that we build. Probably can be easily fixed.
|
||||
message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY is not compatible with SPLIT_SHARED_LIBRARIES. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (NOT ARCH_AMD64)
|
||||
# It's not supported yet, but you can help.
|
||||
message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY is only available for x86_64. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
elseif (SANITIZE STREQUAL "undefined")
|
||||
# llvm-tblgen, that is used during LLVM build, doesn't work with UBSan.
|
||||
message(WARNING "Option USE_INTERNAL_LLVM_LIBRARY does not work with UBSan, because 'llvm-tblgen' tool from LLVM has undefined behaviour. Build of LLVM will be disabled.")
|
||||
set (LLVM_FOUND 0)
|
||||
set (USE_EMBEDDED_COMPILER 0)
|
||||
else ()
|
||||
set (USE_INTERNAL_LLVM_LIBRARY ON)
|
||||
set (LLVM_FOUND 1)
|
||||
set (USE_EMBEDDED_COMPILER 1)
|
||||
set (LLVM_VERSION "9.0.0bundled")
|
||||
set (LLVM_INCLUDE_DIRS
|
||||
"${ClickHouse_SOURCE_DIR}/contrib/llvm/llvm/include"
|
||||
"${ClickHouse_BINARY_DIR}/contrib/llvm/llvm/include"
|
||||
)
|
||||
set (LLVM_LIBRARY_DIRS "${ClickHouse_BINARY_DIR}/contrib/llvm/llvm")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (LLVM_FOUND)
|
||||
message(STATUS "LLVM include Directory: ${LLVM_INCLUDE_DIRS}")
|
||||
message(STATUS "LLVM library Directory: ${LLVM_LIBRARY_DIRS}")
|
||||
message(STATUS "LLVM C++ compiler flags: ${LLVM_CXXFLAGS}")
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable LLVM")
|
||||
endif()
|
||||
|
||||
# This list was generated by listing all LLVM libraries, compiling the binary and removing all libraries while it still compiles.
|
||||
set (REQUIRED_LLVM_LIBRARIES
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
if (ENABLE_ODBC AND NOT USE_INTERNAL_ODBC_LIBRARY)
|
||||
set (LTDL_PATHS "/usr/local/opt/libtool/lib")
|
||||
find_library (LTDL_LIBRARY ltdl PATHS ${LTDL_PATHS})
|
||||
find_library (LTDL_LIBRARY ltdl PATHS ${LTDL_PATHS} REQUIRED)
|
||||
message (STATUS "Using ltdl: ${LTDL_LIBRARY}")
|
||||
endif ()
|
||||
|
|
|
@ -1,27 +1,37 @@
|
|||
option (ENABLE_MSGPACK "Enable msgpack library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (ENABLE_MSGPACK)
|
||||
if(NOT ENABLE_MSGPACK)
|
||||
if(USE_INTERNAL_MSGPACK_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal msgpack with ENABLE_MSGPACK=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_MSGPACK_LIBRARY "Set to FALSE to use system msgpack library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (USE_INTERNAL_MSGPACK_LIBRARY)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include/msgpack.hpp")
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include/msgpack.hpp")
|
||||
if(USE_INTERNAL_MSGPACK_LIBRARY)
|
||||
message(WARNING "Submodule contrib/msgpack-c is missing. To fix try run: \n git submodule update --init --recursive")
|
||||
set(USE_INTERNAL_MSGPACK_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_MSGPACK_LIBRARY 1)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal msgpack")
|
||||
set(USE_INTERNAL_MSGPACK_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_MSGPACK_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if(NOT USE_INTERNAL_MSGPACK_LIBRARY)
|
||||
find_path(MSGPACK_INCLUDE_DIR NAMES msgpack.hpp PATHS ${MSGPACK_INCLUDE_PATHS})
|
||||
if(NOT MSGPACK_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system msgpack")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_MSGPACK_LIBRARY)
|
||||
set(MSGPACK_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include)
|
||||
else()
|
||||
find_path(MSGPACK_INCLUDE_DIR NAMES msgpack.hpp PATHS ${MSGPACK_INCLUDE_PATHS})
|
||||
if(NOT MSGPACK_INCLUDE_DIR AND NOT MISSING_INTERNAL_MSGPACK_LIBRARY)
|
||||
set(MSGPACK_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/msgpack-c/include")
|
||||
set(USE_INTERNAL_MSGPACK_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (MSGPACK_INCLUDE_DIR)
|
||||
set(USE_MSGPACK 1)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message(STATUS "Using msgpack=${USE_MSGPACK}: ${MSGPACK_INCLUDE_DIR}")
|
||||
|
|
|
@ -4,56 +4,73 @@ else ()
|
|||
option(ENABLE_MYSQL "Enable MySQL" FALSE)
|
||||
endif ()
|
||||
|
||||
if(ENABLE_MYSQL)
|
||||
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
|
||||
if(NOT ENABLE_MYSQL)
|
||||
if (USE_INTERNAL_MYSQL_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal mysql library with ENABLE_MYSQL=OFF")
|
||||
endif ()
|
||||
message (STATUS "Build without mysqlclient (support for MYSQL dictionary source will be disabled)")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(USE_INTERNAL_MYSQL_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README")
|
||||
option(USE_INTERNAL_MYSQL_LIBRARY "Set to FALSE to use system mysqlclient library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/mariadb-connector-c/README")
|
||||
if(USE_INTERNAL_MYSQL_LIBRARY)
|
||||
message(WARNING "submodule contrib/mariadb-connector-c is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal mysql library")
|
||||
set(USE_INTERNAL_MYSQL_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_MYSQL_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_MYSQL_LIBRARY)
|
||||
set (MYSQLCLIENT_LIBRARIES mariadbclient)
|
||||
if (NOT USE_INTERNAL_MYSQL_LIBRARY)
|
||||
set (MYSQL_LIB_PATHS
|
||||
"/usr/local/opt/mysql/lib"
|
||||
"/usr/local/lib"
|
||||
"/usr/local/lib64"
|
||||
"/usr/local/lib/mariadb" # macos brew mariadb-connector-c
|
||||
"/usr/mysql/lib"
|
||||
"/usr/mysql/lib64"
|
||||
"/usr/lib"
|
||||
"/usr/lib64"
|
||||
"/lib"
|
||||
"/lib64")
|
||||
|
||||
set (MYSQL_INCLUDE_PATHS
|
||||
"/usr/local/opt/mysql/include"
|
||||
"/usr/mysql/include"
|
||||
"/usr/local/include"
|
||||
"/usr/include/mariadb"
|
||||
"/usr/include/mysql"
|
||||
"/usr/include")
|
||||
|
||||
find_path (MYSQL_INCLUDE_DIR NAMES mysql.h mysql/mysql.h mariadb/mysql.h PATHS ${MYSQL_INCLUDE_PATHS} PATH_SUFFIXES mysql)
|
||||
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
find_library (STATIC_MYSQLCLIENT_LIB NAMES mariadbclient mysqlclient PATHS ${MYSQL_LIB_PATHS} PATH_SUFFIXES mysql)
|
||||
else ()
|
||||
find_library (MYSQLCLIENT_LIBRARIES NAMES mariadb mariadbclient mysqlclient PATHS ${MYSQL_LIB_PATHS} PATH_SUFFIXES mysql)
|
||||
endif ()
|
||||
|
||||
if (MYSQL_INCLUDE_DIR AND (STATIC_MYSQLCLIENT_LIB OR MYSQLCLIENT_LIBRARIES))
|
||||
set (USE_MYSQL 1)
|
||||
set (MYSQLXX_LIBRARY mysqlxx)
|
||||
if (APPLE)
|
||||
# /usr/local/include/mysql/mysql_com.h:1011:10: fatal error: mysql/udf_registration_types.h: No such file or directory
|
||||
set(MYSQL_INCLUDE_DIR ${MYSQL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR}/mysql)
|
||||
endif ()
|
||||
else ()
|
||||
set (MYSQL_LIB_PATHS
|
||||
"/usr/local/opt/mysql/lib"
|
||||
"/usr/local/lib"
|
||||
"/usr/local/lib64"
|
||||
"/usr/local/lib/mariadb" # macos brew mariadb-connector-c
|
||||
"/usr/mysql/lib"
|
||||
"/usr/mysql/lib64"
|
||||
"/usr/lib"
|
||||
"/usr/lib64"
|
||||
"/lib"
|
||||
"/lib64")
|
||||
|
||||
set (MYSQL_INCLUDE_PATHS
|
||||
"/usr/local/opt/mysql/include"
|
||||
"/usr/mysql/include"
|
||||
"/usr/local/include"
|
||||
"/usr/include")
|
||||
|
||||
find_path (MYSQL_INCLUDE_DIR NAMES mysql/mysql.h mariadb/mysql.h PATHS ${MYSQL_INCLUDE_PATHS} PATH_SUFFIXES mysql)
|
||||
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
find_library (STATIC_MYSQLCLIENT_LIB NAMES mariadbclient mysqlclient PATHS ${MYSQL_LIB_PATHS} PATH_SUFFIXES mysql)
|
||||
else ()
|
||||
find_library (MYSQLCLIENT_LIBRARIES NAMES mariadb mariadbclient mysqlclient PATHS ${MYSQL_LIB_PATHS} PATH_SUFFIXES mysql)
|
||||
endif ()
|
||||
|
||||
if (MYSQL_INCLUDE_DIR AND (STATIC_MYSQLCLIENT_LIB OR MYSQLCLIENT_LIBRARIES))
|
||||
set (USE_MYSQL 1)
|
||||
set (MYSQLXX_LIBRARY mysqlxx)
|
||||
if (APPLE)
|
||||
# /usr/local/include/mysql/mysql_com.h:1011:10: fatal error: mysql/udf_registration_types.h: No such file or directory
|
||||
set(MYSQL_INCLUDE_DIR ${MYSQL_INCLUDE_DIR} ${MYSQL_INCLUDE_DIR}/mysql)
|
||||
endif ()
|
||||
endif ()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system mysql library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT USE_MYSQL AND NOT MISSING_INTERNAL_MYSQL_LIBRARY)
|
||||
set (MYSQLCLIENT_LIBRARIES mariadbclient)
|
||||
set (MYSQLXX_LIBRARY mysqlxx)
|
||||
set (USE_MYSQL 1)
|
||||
set (USE_INTERNAL_MYSQL_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (USE_MYSQL)
|
||||
message (STATUS "Using mysqlclient=${USE_MYSQL}: ${MYSQL_INCLUDE_DIR} : ${MYSQLCLIENT_LIBRARIES}; staticlib=${STATIC_MYSQLCLIENT_LIB}")
|
||||
else ()
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
option (ENABLE_ODBC "Enable ODBC library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT OS_LINUX)
|
||||
if (ENABLE_ODBC)
|
||||
message(STATUS "ODBC is only supported on Linux")
|
||||
endif()
|
||||
set (ENABLE_ODBC OFF CACHE INTERNAL "")
|
||||
endif ()
|
||||
|
||||
if (NOT ENABLE_ODBC)
|
||||
if (USE_INTERNAL_ODBC_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal ODBC with ENABLE_ODBC=OFF")
|
||||
endif()
|
||||
|
||||
add_library (unixodbc INTERFACE)
|
||||
target_compile_definitions (unixodbc INTERFACE USE_ODBC=0)
|
||||
|
||||
message (STATUS "Not using unixodbc")
|
||||
return()
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_ODBC_LIBRARY "Use internal ODBC library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT USE_INTERNAL_ODBC_LIBRARY)
|
||||
find_library (LIBRARY_ODBC NAMES unixodbc odbc)
|
||||
find_path (INCLUDE_ODBC sql.h)
|
||||
|
||||
if(LIBRARY_ODBC AND INCLUDE_ODBC)
|
||||
add_library (unixodbc UNKNOWN IMPORTED)
|
||||
set_target_properties (unixodbc PROPERTIES IMPORTED_LOCATION ${LIBRARY_ODBC})
|
||||
set_target_properties (unixodbc PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_ODBC})
|
||||
set_target_properties (unixodbc PROPERTIES INTERFACE_COMPILE_DEFINITIONS USE_ODBC=1)
|
||||
|
||||
if (USE_STATIC_LIBRARIES)
|
||||
find_library(LTDL_LIBRARY ltdl)
|
||||
if (LTDL_LIBRARY)
|
||||
target_link_libraries(unixodbc INTERFACE ${LTDL_LIBRARY})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(EXTERNAL_ODBC_LIBRARY_FOUND 1)
|
||||
message (STATUS "Found odbc: ${LIBRARY_ODBC}")
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system ODBC library")
|
||||
set(EXTERNAL_ODBC_LIBRARY_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EXTERNAL_ODBC_LIBRARY_FOUND)
|
||||
set (USE_INTERNAL_ODBC_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using unixodbc")
|
|
@ -3,12 +3,14 @@ if(0)
|
|||
option(ENABLE_OPENCL "Enable OpenCL support" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if(ENABLE_OPENCL)
|
||||
if(NOT ENABLE_OPENCL)
|
||||
return()
|
||||
endif()
|
||||
|
||||
# Intel OpenCl driver: sudo apt install intel-opencl-icd
|
||||
# @sa https://github.com/intel/compute-runtime/releases
|
||||
|
||||
# OpenCL applications should link wiht ICD loader
|
||||
# OpenCL applications should link with ICD loader
|
||||
# sudo apt install opencl-headers ocl-icd-libopencl1
|
||||
# sudo ln -s /usr/lib/x86_64-linux-gnu/libOpenCL.so.1.0.0 /usr/lib/libOpenCL.so
|
||||
# TODO: add https://github.com/OCL-dev/ocl-icd as submodule instead
|
||||
|
@ -16,8 +18,8 @@ if(ENABLE_OPENCL)
|
|||
find_package(OpenCL)
|
||||
if(OpenCL_FOUND)
|
||||
set(USE_OPENCL 1)
|
||||
endif()
|
||||
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable OpenCL support")
|
||||
endif()
|
||||
|
||||
message(STATUS "Using opencl=${USE_OPENCL}: ${OpenCL_INCLUDE_DIRS} : ${OpenCL_LIBRARIES}")
|
||||
|
|
|
@ -1,12 +1,25 @@
|
|||
option (ENABLE_ORC "Enable ORC" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(ENABLE_ORC)
|
||||
if(NOT ENABLE_ORC)
|
||||
if(USE_INTERNAL_ORC_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal ORC library with ENABLE_ORD=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_PARQUET_LIBRARY)
|
||||
option(USE_INTERNAL_ORC_LIBRARY "Set to FALSE to use system ORC instead of bundled (experimental set to OFF on your own risk)"
|
||||
ON)
|
||||
elseif(USE_INTERNAL_ORC_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Currently internal ORC can be build only with bundled Parquet")
|
||||
endif()
|
||||
|
||||
include(cmake/find/snappy.cmake)
|
||||
option(USE_INTERNAL_ORC_LIBRARY "Set to FALSE to use system ORC instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/orc/c++/include/orc/OrcFile.hh")
|
||||
if(USE_INTERNAL_ORC_LIBRARY)
|
||||
message(WARNING "submodule contrib/orc is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal ORC")
|
||||
set(USE_INTERNAL_ORC_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_ORC_LIBRARY 1)
|
||||
|
@ -14,6 +27,9 @@ endif ()
|
|||
|
||||
if (NOT USE_INTERNAL_ORC_LIBRARY)
|
||||
find_package(orc)
|
||||
if (NOT ORC_LIBRARY OR NOT ORC_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system ORC")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
#if (USE_INTERNAL_ORC_LIBRARY)
|
||||
|
@ -30,10 +46,12 @@ elseif(NOT MISSING_INTERNAL_ORC_LIBRARY AND ARROW_LIBRARY AND SNAPPY_LIBRARY) #
|
|||
set(ORC_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/orc/c++/include")
|
||||
set(ORC_LIBRARY orc)
|
||||
set(USE_ORC 1)
|
||||
set(USE_INTERNAL_ORC_LIBRARY 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL}
|
||||
"Can't enable ORC support - missing dependencies. Missing internal orc=${MISSING_INTERNAL_ORC_LIBRARY}. "
|
||||
"arrow=${ARROW_LIBRARY} snappy=${SNAPPY_LIBRARY}")
|
||||
set(USE_INTERNAL_ORC_LIBRARY 0)
|
||||
endif()
|
||||
|
||||
endif()
|
||||
|
||||
message (STATUS "Using internal=${USE_INTERNAL_ORC_LIBRARY} orc=${USE_ORC}: ${ORC_INCLUDE_DIR} : ${ORC_LIBRARY}")
|
||||
|
|
|
@ -1,31 +1,123 @@
|
|||
if (Protobuf_PROTOC_EXECUTABLE)
|
||||
option (ENABLE_PARQUET "Enable parquet" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_PARQUET OR USE_INTERNAL_PARQUET_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use parquet without protoc executable")
|
||||
endif()
|
||||
|
||||
if (ENABLE_PARQUET)
|
||||
if (NOT ENABLE_PARQUET)
|
||||
if(USE_INTERNAL_PARQUET_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Cannot use internal parquet with ENABLE_PARQUET=OFF")
|
||||
endif()
|
||||
message(STATUS "Building without Parquet support")
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT OS_FREEBSD) # Freebsd: ../contrib/arrow/cpp/src/arrow/util/bit-util.h:27:10: fatal error: endian.h: No such file or directory
|
||||
option(USE_INTERNAL_PARQUET_LIBRARY "Set to FALSE to use system parquet library instead of bundled" ${NOT_UNBUNDLED})
|
||||
elseif(USE_INTERNAL_PARQUET_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal parquet is not supported on freebsd")
|
||||
endif()
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/CMakeLists.txt")
|
||||
if(USE_INTERNAL_PARQUET_LIBRARY)
|
||||
message(WARNING "submodule contrib/arrow (required for Parquet) is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal parquet library")
|
||||
set(USE_INTERNAL_PARQUET_LIBRARY 0)
|
||||
endif()
|
||||
set(USE_INTERNAL_PARQUET_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_PARQUET_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (NOT SNAPPY_LIBRARY)
|
||||
include(cmake/find/snappy.cmake)
|
||||
endif()
|
||||
|
||||
if(NOT USE_INTERNAL_PARQUET_LIBRARY)
|
||||
find_package(Arrow)
|
||||
find_package(Parquet)
|
||||
find_library(THRIFT_LIBRARY thrift)
|
||||
find_library(UTF8_PROC_LIBRARY utf8proc)
|
||||
find_package(BZip2)
|
||||
|
||||
if(USE_STATIC_LIBRARIES)
|
||||
find_library(ARROW_DEPS_LIBRARY arrow_bundled_dependencies)
|
||||
|
||||
if (ARROW_DEPS_LIBRARY)
|
||||
set(ARROW_IMPORT_OBJ_DIR "${CMAKE_CURRENT_BINARY_DIR}/contrib/arrow-cmake/imported-objects")
|
||||
set(ARROW_OTHER_OBJS
|
||||
"${ARROW_IMPORT_OBJ_DIR}/jemalloc.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/arena.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/background_thread.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/base.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/bin.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/bitmap.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/ckh.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/ctl.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/div.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/extent.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/extent_dss.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/extent_mmap.pic.o"
|
||||
# skip hash
|
||||
"${ARROW_IMPORT_OBJ_DIR}/hook.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/large.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/log.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/malloc_io.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/mutex.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/mutex_pool.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/nstime.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/pages.pic.o"
|
||||
# skip prng
|
||||
"${ARROW_IMPORT_OBJ_DIR}/prof.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/rtree.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/stats.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/sc.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/sz.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/tcache.pic.o"
|
||||
# skip ticker
|
||||
"${ARROW_IMPORT_OBJ_DIR}/tsd.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/test_hooks.pic.o"
|
||||
"${ARROW_IMPORT_OBJ_DIR}/witness.pic.o"
|
||||
)
|
||||
add_custom_command(OUTPUT ${ARROW_OTHER_OBJS}
|
||||
COMMAND
|
||||
mkdir -p "${ARROW_IMPORT_OBJ_DIR}" &&
|
||||
cd "${ARROW_IMPORT_OBJ_DIR}" &&
|
||||
"${CMAKE_AR}" x "${ARROW_DEPS_LIBRARY}"
|
||||
)
|
||||
set_source_files_properties(jemalloc.pic.o PROPERTIES EXTERNAL_OBJECT true GENERATED true)
|
||||
add_library(imported_arrow_deps STATIC ${ARROW_OTHER_OBJS})
|
||||
|
||||
set(ARROW_LIBRARY ${ARROW_STATIC_LIB}
|
||||
imported_arrow_deps ${THRIFT_LIBRARY} ${UTF8_PROC_LIBRARY} ${BZIP2_LIBRARIES} ${SNAPPY_LIBRARY})
|
||||
else()
|
||||
message(WARNING "Using external static Arrow does not always work. "
|
||||
"Could not find arrow_bundled_dependencies.a. If compilation fails, "
|
||||
"Try: -D\"USE_INTERNAL_PARQUET_LIBRARY\"=ON or -D\"ENABLE_PARQUET\"=OFF or "
|
||||
"-D\"USE_STATIC_LIBRARIES\"=OFF")
|
||||
set(ARROW_LIBRARY ${ARROW_STATIC_LIB})
|
||||
endif()
|
||||
set(PARQUET_LIBRARY ${PARQUET_STATIC_LIB})
|
||||
else()
|
||||
set(ARROW_LIBRARY ${ARROW_SHARED_LIB})
|
||||
set(PARQUET_LIBRARY ${PARQUET_SHARED_LIB})
|
||||
endif()
|
||||
|
||||
if(ARROW_INCLUDE_DIR AND ARROW_LIBRARY AND PARQUET_INCLUDE_DIR AND PARQUET_LIBRARY AND THRIFT_LIBRARY AND UTF8_PROC_LIBRARY AND BZIP2_FOUND)
|
||||
set(USE_PARQUET 1)
|
||||
set(EXTERNAL_PARQUET_FOUND 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL}
|
||||
"Can't find system parquet: arrow=${ARROW_INCLUDE_DIR}:${ARROW_LIBRARY} ;"
|
||||
" parquet=${PARQUET_INCLUDE_DIR}:${PARQUET_LIBRARY} ;"
|
||||
" thrift=${THRIFT_LIBRARY} ;")
|
||||
set(EXTERNAL_PARQUET_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ARROW_INCLUDE_DIR AND PARQUET_INCLUDE_DIR)
|
||||
elseif(NOT MISSING_INTERNAL_PARQUET_LIBRARY AND NOT OS_FREEBSD)
|
||||
include(cmake/find/snappy.cmake)
|
||||
if(NOT EXTERNAL_PARQUET_FOUND AND NOT MISSING_INTERNAL_PARQUET_LIBRARY AND NOT OS_FREEBSD)
|
||||
if(SNAPPY_LIBRARY)
|
||||
set(CAN_USE_INTERNAL_PARQUET_LIBRARY 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal parquet library without snappy")
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceCompiles)
|
||||
|
@ -33,19 +125,20 @@ elseif(NOT MISSING_INTERNAL_PARQUET_LIBRARY AND NOT OS_FREEBSD)
|
|||
set(CMAKE_REQUIRED_LIBRARIES ${DOUBLE_CONVERSION_LIBRARIES})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${DOUBLE_CONVERSION_INCLUDE_DIR})
|
||||
check_cxx_source_compiles("
|
||||
#include <double-conversion/double-conversion.h>
|
||||
int main() { static const int flags_ = double_conversion::StringToDoubleConverter::ALLOW_CASE_INSENSIBILITY; return 0;}
|
||||
#include <double-conversion/double-conversion.h>
|
||||
int main() { static const int flags_ = double_conversion::StringToDoubleConverter::ALLOW_CASE_INSENSIBILITY; return 0;}
|
||||
" HAVE_DOUBLE_CONVERSION_ALLOW_CASE_INSENSIBILITY)
|
||||
|
||||
if(NOT HAVE_DOUBLE_CONVERSION_ALLOW_CASE_INSENSIBILITY) # HAVE_STD_RANDOM_SHUFFLE
|
||||
message(STATUS "Disabling internal parquet library because arrow is broken (can't use old double_conversion)")
|
||||
set(CAN_USE_INTERNAL_PARQUET_LIBRARY 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Disabling internal parquet library because arrow is broken (can't use old double_conversion)")
|
||||
set(CAN_USE_INTERNAL_PARQUET_LIBRARY 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT CAN_USE_INTERNAL_PARQUET_LIBRARY)
|
||||
if(NOT CAN_USE_INTERNAL_PARQUET_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal parquet")
|
||||
set(USE_INTERNAL_PARQUET_LIBRARY 0)
|
||||
else()
|
||||
else()
|
||||
set(USE_INTERNAL_PARQUET_LIBRARY 1)
|
||||
|
||||
if(USE_INTERNAL_PARQUET_LIBRARY_NATIVE_CMAKE)
|
||||
|
@ -53,7 +146,7 @@ elseif(NOT MISSING_INTERNAL_PARQUET_LIBRARY AND NOT OS_FREEBSD)
|
|||
set(PARQUET_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/arrow/cpp/src" ${ClickHouse_BINARY_DIR}/contrib/arrow/cpp/src)
|
||||
endif()
|
||||
|
||||
if(${USE_STATIC_LIBRARIES})
|
||||
if(MAKE_STATIC_LIBRARIES)
|
||||
set(FLATBUFFERS_LIBRARY flatbuffers)
|
||||
set(ARROW_LIBRARY arrow_static)
|
||||
set(PARQUET_LIBRARY parquet_static)
|
||||
|
@ -72,12 +165,15 @@ elseif(NOT MISSING_INTERNAL_PARQUET_LIBRARY AND NOT OS_FREEBSD)
|
|||
set(USE_ORC 1)
|
||||
set(USE_ARROW 1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
elseif(OS_FREEBSD)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal parquet library on FreeBSD is not supported")
|
||||
endif()
|
||||
|
||||
if(USE_PARQUET)
|
||||
message(STATUS "Using Parquet: ${ARROW_LIBRARY}:${ARROW_INCLUDE_DIR} ; ${PARQUET_LIBRARY}:${PARQUET_INCLUDE_DIR} ; ${THRIFT_LIBRARY} ; ${FLATBUFFERS_LIBRARY}")
|
||||
message(STATUS "Using Parquet: arrow=${ARROW_LIBRARY}:${ARROW_INCLUDE_DIR} ;"
|
||||
" parquet=${PARQUET_LIBRARY}:${PARQUET_INCLUDE_DIR} ;"
|
||||
" thrift=${THRIFT_LIBRARY} ;"
|
||||
" flatbuffers=${FLATBUFFERS_LIBRARY}")
|
||||
else()
|
||||
message(STATUS "Building without Parquet support")
|
||||
endif()
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
option (USE_INTERNAL_POCO_LIBRARY "Use internal Poco library" ON)
|
||||
|
||||
if (USE_INTERNAL_POCO_LIBRARY)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/poco)
|
||||
else ()
|
||||
find_path (ROOT_DIR NAMES Foundation/include/Poco/Poco.h include/Poco/Poco.h)
|
||||
if (NOT ROOT_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system poco")
|
||||
endif()
|
||||
endif ()
|
|
@ -1,12 +1,18 @@
|
|||
option(ENABLE_PROTOBUF "Enable protobuf" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(ENABLE_PROTOBUF)
|
||||
if(NOT ENABLE_PROTOBUF)
|
||||
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal protobuf with ENABLE_PROTOBUF=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_PROTOBUF_LIBRARY "Set to FALSE to use system protobuf instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/protobuf/cmake/CMakeLists.txt")
|
||||
if(USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
message(WARNING "submodule contrib/protobuf is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal protobuf")
|
||||
set(USE_INTERNAL_PROTOBUF_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_PROTOBUF_LIBRARY 1)
|
||||
|
@ -14,12 +20,17 @@ endif()
|
|||
|
||||
if(NOT USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
find_package(Protobuf)
|
||||
if (Protobuf_LIBRARY AND Protobuf_INCLUDE_DIR AND Protobuf_PROTOC_EXECUTABLE)
|
||||
set(EXTERNAL_PROTOBUF_LIBRARY_FOUND 1)
|
||||
set(USE_PROTOBUF 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system protobuf")
|
||||
set(EXTERNAL_PROTOBUF_LIBRARY_FOUND 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (Protobuf_LIBRARY AND Protobuf_INCLUDE_DIR)
|
||||
set(USE_PROTOBUF 1)
|
||||
elseif(NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
|
||||
set(Protobuf_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/protobuf/src)
|
||||
if (NOT EXTERNAL_PROTOBUF_LIBRARY_FOUND AND NOT MISSING_INTERNAL_PROTOBUF_LIBRARY)
|
||||
set(Protobuf_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/protobuf/src")
|
||||
|
||||
set(USE_PROTOBUF 1)
|
||||
set(USE_INTERNAL_PROTOBUF_LIBRARY 1)
|
||||
|
@ -34,13 +45,13 @@ if(OS_FREEBSD AND SANITIZE STREQUAL "address")
|
|||
# ../contrib/protobuf/src/google/protobuf/arena_impl.h:45:10: fatal error: 'sanitizer/asan_interface.h' file not found
|
||||
# #include <sanitizer/asan_interface.h>
|
||||
if(LLVM_INCLUDE_DIRS)
|
||||
set(Protobuf_INCLUDE_DIR ${Protobuf_INCLUDE_DIR} ${LLVM_INCLUDE_DIRS})
|
||||
set(Protobuf_INCLUDE_DIR "${Protobuf_INCLUDE_DIR}" ${LLVM_INCLUDE_DIRS})
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use protobuf on FreeBSD with address sanitizer without LLVM")
|
||||
set(USE_PROTOBUF 0)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include (${ClickHouse_SOURCE_DIR}/cmake/protobuf_generate_cpp.cmake)
|
||||
endif()
|
||||
include ("${ClickHouse_SOURCE_DIR}/cmake/protobuf_generate_cpp.cmake")
|
||||
|
||||
message(STATUS "Using protobuf=${USE_PROTOBUF}: ${Protobuf_INCLUDE_DIR} : ${Protobuf_LIBRARY} : ${Protobuf_PROTOC_EXECUTABLE}")
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
option(ENABLE_RAPIDJSON "Use rapidjson" ${ENABLE_LIBRARIES})
|
||||
if(NOT ENABLE_RAPIDJSON)
|
||||
if(USE_INTERNAL_RAPIDJSON_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal rapidjson library with ENABLE_RAPIDJSON=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
|
@ -8,6 +11,7 @@ option(USE_INTERNAL_RAPIDJSON_LIBRARY "Set to FALSE to use system rapidjson libr
|
|||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/rapidjson/include/rapidjson/rapidjson.h")
|
||||
if(USE_INTERNAL_RAPIDJSON_LIBRARY)
|
||||
message(WARNING "submodule contrib/rapidjson is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal rapidjson library")
|
||||
set(USE_INTERNAL_RAPIDJSON_LIBRARY 0)
|
||||
endif()
|
||||
set(MISSING_INTERNAL_RAPIDJSON_LIBRARY 1)
|
||||
|
@ -15,6 +19,9 @@ endif()
|
|||
|
||||
if(NOT USE_INTERNAL_RAPIDJSON_LIBRARY)
|
||||
find_path(RAPIDJSON_INCLUDE_DIR NAMES rapidjson/rapidjson.h PATHS ${RAPIDJSON_INCLUDE_PATHS})
|
||||
if(NOT RAPIDJSON_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system rapidjson")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(RAPIDJSON_INCLUDE_DIR)
|
||||
|
|
|
@ -1,37 +1,66 @@
|
|||
# Freebsd: contrib/cppkafka/include/cppkafka/detail/endianness.h:53:23: error: 'betoh16' was not declared in this scope
|
||||
if (NOT ARCH_ARM AND NOT OS_FREEBSD AND OPENSSL_FOUND)
|
||||
option (ENABLE_RDKAFKA "Enable kafka" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_RDKAFKA AND NOT OPENSSL_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use librdkafka without SSL")
|
||||
elseif(ENABLE_RDKAFKA)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "librdafka is not supported on ARM and on FreeBSD")
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/cppkafka is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (ENABLE_RDKAFKA 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_RDKAFKA)
|
||||
if (NOT ENABLE_RDKAFKA)
|
||||
if (USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal librdkafka with ENABLE_RDKAFKA=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (NOT ARCH_ARM AND USE_LIBGSASL)
|
||||
option (USE_INTERNAL_RDKAFKA_LIBRARY "Set to FALSE to use system librdkafka instead of the bundled" ${NOT_UNBUNDLED})
|
||||
elseif(USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal librdkafka with ARCH_ARM=${ARCH_ARM} AND USE_LIBGSASL=${USE_LIBGSASL}")
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_RDKAFKA_LIBRARY AND NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/CMakeLists.txt")
|
||||
message (WARNING "submodule contrib/librdkafka is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 0)
|
||||
set (MISSING_INTERNAL_RDKAFKA_LIBRARY 1)
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/cppkafka/CMakeLists.txt")
|
||||
if(USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
message (WARNING "submodule contrib/cppkafka is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal cppkafka")
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 0)
|
||||
endif()
|
||||
set (MISSING_INTERNAL_CPPKAFKA_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/CMakeLists.txt")
|
||||
if(USE_INTERNAL_RDKAFKA_LIBRARY OR MISSING_INTERNAL_CPPKAFKA_LIBRARY)
|
||||
message (WARNING "submodule contrib/librdkafka is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal rdkafka")
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 0)
|
||||
endif()
|
||||
set (MISSING_INTERNAL_RDKAFKA_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
if (NOT USE_INTERNAL_RDKAFKA_LIBRARY)
|
||||
find_library (RDKAFKA_LIB rdkafka)
|
||||
find_path (RDKAFKA_INCLUDE_DIR NAMES librdkafka/rdkafka.h PATHS ${RDKAFKA_INCLUDE_PATHS})
|
||||
if (NOT RDKAFKA_LIB OR NOT RDKAFKA_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system librdkafka")
|
||||
endif()
|
||||
|
||||
if (USE_STATIC_LIBRARIES AND NOT OS_FREEBSD)
|
||||
find_library (SASL2_LIBRARY sasl2)
|
||||
if (NOT SASL2_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system sasl2 library needed for static librdkafka")
|
||||
endif()
|
||||
endif ()
|
||||
set (CPPKAFKA_LIBRARY cppkafka) # TODO: try to use unbundled version.
|
||||
endif ()
|
||||
|
||||
if (RDKAFKA_LIB AND RDKAFKA_INCLUDE_DIR)
|
||||
set (USE_RDKAFKA 1)
|
||||
set (RDKAFKA_LIBRARY ${RDKAFKA_LIB} ${OPENSSL_LIBRARIES})
|
||||
add_library (rdkafka_imp UNKNOWN IMPORTED)
|
||||
set_target_properties (rdkafka_imp PROPERTIES IMPORTED_LOCATION ${RDKAFKA_LIB})
|
||||
set_target_properties (rdkafka_imp PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${RDKAFKA_INCLUDE_DIR})
|
||||
|
||||
set (RDKAFKA_LIBRARY rdkafka_imp ${OPENSSL_LIBRARIES})
|
||||
set (CPPKAFKA_LIBRARY cppkafka)
|
||||
if (SASL2_LIBRARY)
|
||||
list (APPEND RDKAFKA_LIBRARY ${SASL2_LIBRARY})
|
||||
|
@ -39,14 +68,14 @@ if (RDKAFKA_LIB AND RDKAFKA_INCLUDE_DIR)
|
|||
if (LZ4_LIBRARY)
|
||||
list (APPEND RDKAFKA_LIBRARY ${LZ4_LIBRARY})
|
||||
endif ()
|
||||
elseif (NOT MISSING_INTERNAL_RDKAFKA_LIBRARY AND NOT ARCH_ARM)
|
||||
elseif (NOT MISSING_INTERNAL_RDKAFKA_LIBRARY AND NOT MISSING_INTERNAL_CPPKAFKA_LIBRARY AND NOT ARCH_ARM)
|
||||
set (USE_INTERNAL_RDKAFKA_LIBRARY 1)
|
||||
set (RDKAFKA_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/librdkafka/src")
|
||||
set (RDKAFKA_LIBRARY rdkafka)
|
||||
set (CPPKAFKA_LIBRARY cppkafka)
|
||||
set (USE_RDKAFKA 1)
|
||||
endif ()
|
||||
|
||||
elseif(ARCH_ARM)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal rdkafka on ARM is not supported")
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using librdkafka=${USE_RDKAFKA}: ${RDKAFKA_INCLUDE_DIR} : ${RDKAFKA_LIBRARY} ${CPPKAFKA_LIBRARY}")
|
||||
|
|
|
@ -3,6 +3,7 @@ option (USE_INTERNAL_RE2_LIBRARY "Set to FALSE to use system re2 library instead
|
|||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/re2/CMakeLists.txt")
|
||||
if(USE_INTERNAL_RE2_LIBRARY)
|
||||
message(WARNING "submodule contrib/re2 is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal re2 library")
|
||||
endif()
|
||||
set(USE_INTERNAL_RE2_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_RE2_LIBRARY 1)
|
||||
|
@ -11,6 +12,9 @@ endif()
|
|||
if (NOT USE_INTERNAL_RE2_LIBRARY)
|
||||
find_library (RE2_LIBRARY re2)
|
||||
find_path (RE2_INCLUDE_DIR NAMES re2/re2.h PATHS ${RE2_INCLUDE_PATHS})
|
||||
if (NOT RE2_LIBRARY OR NOT RE2_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system re2 library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
string(FIND ${CMAKE_CURRENT_BINARY_DIR} " " _have_space)
|
||||
|
@ -24,12 +28,13 @@ if (RE2_LIBRARY AND RE2_INCLUDE_DIR)
|
|||
elseif (NOT MISSING_INTERNAL_RE2_LIBRARY)
|
||||
set (USE_INTERNAL_RE2_LIBRARY 1)
|
||||
set (RE2_LIBRARY re2)
|
||||
set (RE2_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/re2)
|
||||
set (RE2_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/re2")
|
||||
if (NOT MISSING_INTERNAL_RE2_ST_LIBRARY)
|
||||
set (RE2_ST_LIBRARY re2_st)
|
||||
set (USE_RE2_ST 1)
|
||||
else ()
|
||||
set (RE2_ST_LIBRARY ${RE2_LIBRARY})
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Using internal re2 library instead of re2_st")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -1,26 +1,45 @@
|
|||
if(NOT OS_FREEBSD AND NOT APPLE AND NOT ARCH_ARM)
|
||||
option(ENABLE_S3 "Enable S3" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_S3 OR USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use S3 on ARM, Apple or FreeBSD")
|
||||
endif()
|
||||
|
||||
if(ENABLE_S3)
|
||||
option(USE_INTERNAL_AWS_S3_LIBRARY "Set to FALSE to use system S3 instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
|
||||
message (WARNING "submodule contrib/aws is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
set (MISSING_AWS_S3 1)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_AWS_S3_LIBRARY AND NOT MISSING_AWS_S3)
|
||||
set(AWS_S3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3/include")
|
||||
set(AWS_S3_CORE_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core/include")
|
||||
set(AWS_S3_LIBRARY aws_s3)
|
||||
set(USE_INTERNAL_AWS_S3_LIBRARY 1)
|
||||
set(USE_AWS_S3 1)
|
||||
else()
|
||||
set(USE_INTERNAL_AWS_S3_LIBRARY 0)
|
||||
set(USE_AWS_S3 0)
|
||||
endif ()
|
||||
|
||||
if(NOT ENABLE_S3)
|
||||
if(USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal S3 library with ENABLE_S3=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_AWS_S3_LIBRARY "Set to FALSE to use system S3 instead of bundled (experimental set to OFF on your own risk)"
|
||||
ON)
|
||||
|
||||
if (NOT USE_INTERNAL_POCO_LIBRARY AND USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
message (FATAL_ERROR "Currently S3 support can be built only with internal POCO library")
|
||||
endif()
|
||||
|
||||
if (NOT USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Compilation with external S3 library is not supported yet")
|
||||
endif()
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3")
|
||||
message (WARNING "submodule contrib/aws is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
if (USE_INTERNAL_AWS_S3_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal S3 library")
|
||||
endif ()
|
||||
set (MISSING_AWS_S3 1)
|
||||
endif ()
|
||||
|
||||
if (USE_INTERNAL_AWS_S3_LIBRARY AND NOT MISSING_AWS_S3)
|
||||
set(AWS_S3_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-s3/include")
|
||||
set(AWS_S3_CORE_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/aws/aws-cpp-sdk-core/include")
|
||||
set(AWS_S3_LIBRARY aws_s3)
|
||||
set(USE_INTERNAL_AWS_S3_LIBRARY 1)
|
||||
set(USE_AWS_S3 1)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable S3")
|
||||
set(USE_INTERNAL_AWS_S3_LIBRARY 0)
|
||||
set(USE_AWS_S3 0)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using aws_s3=${USE_AWS_S3}: ${AWS_S3_INCLUDE_DIR} : ${AWS_S3_LIBRARY}")
|
||||
|
|
|
@ -2,6 +2,9 @@ set (SENTRY_LIBRARY "sentry")
|
|||
set (SENTRY_INCLUDE_DIR "${ClickHouse_SOURCE_DIR}/contrib/sentry-native/include")
|
||||
if (NOT EXISTS "${SENTRY_INCLUDE_DIR}/sentry.h")
|
||||
message (WARNING "submodule contrib/sentry-native is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
if (USE_SENTRY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal sentry library")
|
||||
endif()
|
||||
return()
|
||||
endif ()
|
||||
|
||||
|
@ -16,4 +19,6 @@ if (NOT OS_FREEBSD AND NOT SPLIT_SHARED_LIBRARIES AND NOT_UNBUNDLED AND NOT (OS_
|
|||
message (STATUS "Using sentry=${USE_SENTRY}: ${SENTRY_LIBRARY}")
|
||||
|
||||
include_directories("${SENTRY_INCLUDE_DIR}")
|
||||
elseif (USE_SENTRY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Sentry is not supported in current configuration")
|
||||
endif ()
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
option (USE_SIMDJSON "Use simdjson" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/simdjson/include/simdjson.h")
|
||||
message (WARNING "submodule contrib/simdjson is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
if (USE_SIMDJSON)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal simdjson library")
|
||||
endif()
|
||||
return()
|
||||
endif ()
|
||||
|
||||
option (USE_SIMDJSON "Use simdjson" ON)
|
||||
|
||||
message(STATUS "Using simdjson=${USE_SIMDJSON}")
|
||||
|
|
|
@ -1,13 +1,21 @@
|
|||
option(USE_SNAPPY "Enable support of snappy library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(USE_SNAPPY)
|
||||
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
|
||||
find_library(SNAPPY_LIBRARY snappy)
|
||||
else ()
|
||||
set(SNAPPY_LIBRARY snappy)
|
||||
if(NOT USE_SNAPPY)
|
||||
if (USE_INTERNAL_SNAPPY_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal snappy library with USE_SNAPPY=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
message (STATUS "Using snappy: ${SNAPPY_LIBRARY}")
|
||||
endif ()
|
||||
option (USE_INTERNAL_SNAPPY_LIBRARY "Set to FALSE to use system snappy library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT USE_INTERNAL_SNAPPY_LIBRARY)
|
||||
find_library(SNAPPY_LIBRARY snappy)
|
||||
if (NOT SNAPPY_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system snappy library")
|
||||
endif()
|
||||
else ()
|
||||
set(SNAPPY_LIBRARY snappy)
|
||||
endif()
|
||||
|
||||
message (STATUS "Using snappy: ${SNAPPY_LIBRARY}")
|
||||
|
|
|
@ -1,7 +1,11 @@
|
|||
option (USE_INTERNAL_SPARSEHASH_LIBRARY "Set to FALSE to use system sparsehash library instead of bundled" ${NOT_UNBUNDLED})
|
||||
option (USE_INTERNAL_SPARSEHASH_LIBRARY "Set to FALSE to use system sparsehash library instead of bundled"
|
||||
ON) # ON by default as we are not aware of any system providing package for sparsehash-c11
|
||||
|
||||
if (NOT USE_INTERNAL_SPARSEHASH_LIBRARY)
|
||||
find_path (SPARSEHASH_INCLUDE_DIR NAMES sparsehash/sparse_hash_map PATHS ${SPARSEHASH_INCLUDE_PATHS})
|
||||
if (NOT SPARSEHASH_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system sparsehash library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (SPARSEHASH_INCLUDE_DIR)
|
||||
|
|
|
@ -1,12 +1,18 @@
|
|||
option(ENABLE_SSL "Enable ssl" ${ENABLE_LIBRARIES})
|
||||
|
||||
if(ENABLE_SSL)
|
||||
if(NOT ENABLE_SSL)
|
||||
if (USE_INTERNAL_SSL_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal ssl library with ENABLE_SSL=OFF")
|
||||
endif()
|
||||
return()
|
||||
endif()
|
||||
|
||||
option(USE_INTERNAL_SSL_LIBRARY "Set to FALSE to use system *ssl library instead of bundled" ${NOT_UNBUNDLED})
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/openssl/README")
|
||||
if(USE_INTERNAL_SSL_LIBRARY)
|
||||
message(WARNING "submodule contrib/openssl is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal ssl library")
|
||||
endif()
|
||||
set(USE_INTERNAL_SSL_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_SSL_LIBRARY 1)
|
||||
|
@ -36,6 +42,10 @@ if (NOT USE_INTERNAL_SSL_LIBRARY)
|
|||
set (OPENSSL_FOUND 1)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENSSL_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system ssl")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT OPENSSL_FOUND AND NOT MISSING_INTERNAL_SSL_LIBRARY)
|
||||
|
@ -123,7 +133,4 @@ if(OPENSSL_FOUND AND NOT USE_INTERNAL_SSL_LIBRARY)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using ssl=${USE_SSL}: ${OPENSSL_INCLUDE_DIR} : ${OPENSSL_LIBRARIES}")
|
||||
|
|
|
@ -14,6 +14,10 @@ if (ENABLE_STATS)
|
|||
set(GCEM_INCLUDE_DIR ${ClickHouse_SOURCE_DIR}/contrib/gcem/include)
|
||||
set (USE_STATS 1)
|
||||
endif()
|
||||
|
||||
if (NOT USE_STATS)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't enable stats library")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
message (STATUS "Using stats=${USE_STATS} : ${STATS_INCLUDE_DIR}")
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
if (ENABLE_EMBEDDED_COMPILER AND NOT USE_INTERNAL_LLVM_LIBRARY AND USE_STATIC_LIBRARIES)
|
||||
find_library (TERMCAP_LIBRARY tinfo)
|
||||
if (NOT TERMCAP_LIBRARY)
|
||||
find_library (TERMCAP_LIBRARY ncurses)
|
||||
endif()
|
||||
if (NOT TERMCAP_LIBRARY)
|
||||
find_library (TERMCAP_LIBRARY termcap)
|
||||
endif()
|
||||
|
||||
if (NOT TERMCAP_LIBRARY)
|
||||
message (FATAL_ERROR "Statically Linking external LLVM requires termcap")
|
||||
endif()
|
||||
|
||||
target_link_libraries(LLVMSupport INTERFACE ${TERMCAP_LIBRARY})
|
||||
|
||||
message (STATUS "Using termcap: ${TERMCAP_LIBRARY}")
|
||||
endif()
|
|
@ -6,12 +6,14 @@ else ()
|
|||
set (INTERNAL_ZLIB_NAME "zlib" CACHE INTERNAL "")
|
||||
if (NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
|
||||
message (WARNING "Will use standard zlib, please clone manually:\n git clone https://github.com/madler/zlib.git ${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal zlib library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/${INTERNAL_ZLIB_NAME}/zlib.h")
|
||||
if(USE_INTERNAL_ZLIB_LIBRARY)
|
||||
message(WARNING "submodule contrib/${INTERNAL_ZLIB_NAME} is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal zlib library")
|
||||
endif()
|
||||
set(USE_INTERNAL_ZLIB_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_ZLIB_LIBRARY 1)
|
||||
|
@ -19,6 +21,11 @@ endif()
|
|||
|
||||
if (NOT USE_INTERNAL_ZLIB_LIBRARY)
|
||||
find_package (ZLIB)
|
||||
if (NOT ZLIB_FOUND)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system zlib library")
|
||||
else()
|
||||
set (ZLIB_NAME "libz")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY)
|
||||
|
@ -28,6 +35,7 @@ if (NOT ZLIB_FOUND AND NOT MISSING_INTERNAL_ZLIB_LIBRARY)
|
|||
set (ZLIB_INCLUDE_DIRECTORIES ${ZLIB_INCLUDE_DIR}) # for protobuf
|
||||
set (ZLIB_FOUND 1) # for poco
|
||||
set (ZLIB_LIBRARIES zlib CACHE INTERNAL "")
|
||||
set (ZLIB_NAME "${INTERNAL_ZLIB_NAME}")
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using ${INTERNAL_ZLIB_NAME}: ${ZLIB_INCLUDE_DIR} : ${ZLIB_LIBRARIES}")
|
||||
message (STATUS "Using ${ZLIB_NAME}: ${ZLIB_INCLUDE_DIR} : ${ZLIB_LIBRARIES}")
|
||||
|
|
|
@ -3,14 +3,18 @@ option (USE_INTERNAL_ZSTD_LIBRARY "Set to FALSE to use system zstd library inste
|
|||
if(NOT EXISTS "${ClickHouse_SOURCE_DIR}/contrib/zstd/lib/zstd.h")
|
||||
if(USE_INTERNAL_ZSTD_LIBRARY)
|
||||
message(WARNING "submodule contrib/zstd is missing. to fix try run: \n git submodule update --init --recursive")
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find internal zstd library")
|
||||
set(USE_INTERNAL_ZSTD_LIBRARY 0)
|
||||
endif()
|
||||
set(USE_INTERNAL_ZSTD_LIBRARY 0)
|
||||
set(MISSING_INTERNAL_ZSTD_LIBRARY 1)
|
||||
endif()
|
||||
|
||||
if (NOT USE_INTERNAL_ZSTD_LIBRARY)
|
||||
find_library (ZSTD_LIBRARY zstd)
|
||||
find_path (ZSTD_INCLUDE_DIR NAMES zstd.h PATHS ${ZSTD_INCLUDE_PATHS})
|
||||
if (NOT ZSTD_LIBRARY OR NOT ZSTD_INCLUDE_DIR)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system zstd library")
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (ZSTD_LIBRARY AND ZSTD_INCLUDE_DIR)
|
||||
|
|
|
@ -17,21 +17,33 @@ endif ()
|
|||
if (CMAKE_CROSSCOMPILING)
|
||||
if (OS_DARWIN)
|
||||
# FIXME: broken dependencies
|
||||
set (USE_SNAPPY OFF CACHE INTERNAL "")
|
||||
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
||||
set (ENABLE_PARQUET OFF CACHE INTERNAL "")
|
||||
set (ENABLE_GRPC OFF CACHE INTERNAL "") # no protobuf -> no grpc
|
||||
|
||||
set (USE_SNAPPY OFF CACHE INTERNAL "")
|
||||
set (ENABLE_PARQUET OFF CACHE INTERNAL "") # no snappy and protobuf -> no parquet
|
||||
set (ENABLE_ORC OFF CACHE INTERNAL "") # no arrow (parquet) -> no orc
|
||||
|
||||
set (ENABLE_ICU OFF CACHE INTERNAL "")
|
||||
set (ENABLE_FASTOPS OFF CACHE INTERNAL "")
|
||||
elseif (OS_LINUX OR OS_ANDROID)
|
||||
if (ARCH_AARCH64)
|
||||
# FIXME: broken dependencies
|
||||
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
||||
set (ENABLE_GRPC OFF CACHE INTERNAL "")
|
||||
|
||||
set (ENABLE_PARQUET OFF CACHE INTERNAL "")
|
||||
set (ENABLE_ORC OFF CACHE INTERNAL "")
|
||||
|
||||
set (ENABLE_MYSQL OFF CACHE INTERNAL "")
|
||||
endif ()
|
||||
elseif (OS_FREEBSD)
|
||||
# FIXME: broken dependencies
|
||||
set (ENABLE_PROTOBUF OFF CACHE INTERNAL "")
|
||||
set (ENABLE_GRPC OFF CACHE INTERNAL "")
|
||||
|
||||
set (ENABLE_ORC OFF CACHE INTERNAL "") # no protobuf -> no parquet -> no orc
|
||||
|
||||
set (ENABLE_EMBEDDED_COMPILER OFF CACHE INTERNAL "")
|
||||
else ()
|
||||
message (FATAL_ERROR "Trying to cross-compile to unsupported system: ${CMAKE_SYSTEM_NAME}!")
|
||||
|
|
|
@ -41,25 +41,23 @@ STRING(REGEX MATCHALL "[0-9]+" COMPILER_VERSION_LIST ${CMAKE_CXX_COMPILER_VERSIO
|
|||
LIST(GET COMPILER_VERSION_LIST 0 COMPILER_VERSION_MAJOR)
|
||||
|
||||
option (LINKER_NAME "Linker name or full path")
|
||||
if (COMPILER_GCC)
|
||||
if (COMPILER_GCC AND NOT LINKER_NAME)
|
||||
find_program (LLD_PATH NAMES "ld.lld")
|
||||
find_program (GOLD_PATH NAMES "ld.gold")
|
||||
else ()
|
||||
elseif (NOT LINKER_NAME)
|
||||
find_program (LLD_PATH NAMES "ld.lld-${COMPILER_VERSION_MAJOR}" "lld-${COMPILER_VERSION_MAJOR}" "ld.lld" "lld")
|
||||
find_program (GOLD_PATH NAMES "ld.gold" "gold")
|
||||
endif ()
|
||||
|
||||
if (OS_LINUX)
|
||||
if (OS_LINUX AND NOT LINKER_NAME)
|
||||
# We prefer LLD linker over Gold or BFD on Linux.
|
||||
if (NOT LINKER_NAME)
|
||||
if (LLD_PATH)
|
||||
if (COMPILER_GCC)
|
||||
# GCC driver requires one of supported linker names like "lld".
|
||||
set (LINKER_NAME "lld")
|
||||
else ()
|
||||
# Clang driver simply allows full linker path.
|
||||
set (LINKER_NAME ${LLD_PATH})
|
||||
endif ()
|
||||
if (LLD_PATH)
|
||||
if (COMPILER_GCC)
|
||||
# GCC driver requires one of supported linker names like "lld".
|
||||
set (LINKER_NAME "lld")
|
||||
else ()
|
||||
# Clang driver simply allows full linker path.
|
||||
set (LINKER_NAME ${LLD_PATH})
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -311,3 +311,10 @@ if (USE_STATS)
|
|||
add_subdirectory (stats-cmake)
|
||||
add_subdirectory (gcem)
|
||||
endif()
|
||||
|
||||
if (USE_KRB5)
|
||||
add_subdirectory (krb5-cmake)
|
||||
if (USE_CYRUS_SASL)
|
||||
add_subdirectory (cyrus-sasl-cmake)
|
||||
endif()
|
||||
endif()
|
||||
|
|
|
@ -80,7 +80,7 @@ set(FLATBUFFERS_BINARY_DIR ${ClickHouse_BINARY_DIR}/contrib/flatbuffers)
|
|||
set(FLATBUFFERS_INCLUDE_DIR ${FLATBUFFERS_SRC_DIR}/include)
|
||||
|
||||
# set flatbuffers CMake options
|
||||
if (${USE_STATIC_LIBRARIES})
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
set(FLATBUFFERS_BUILD_FLATLIB ON CACHE BOOL "Enable the build of the flatbuffers library")
|
||||
set(FLATBUFFERS_BUILD_SHAREDLIB OFF CACHE BOOL "Disable the build of the flatbuffers shared library")
|
||||
else ()
|
||||
|
|
|
@ -1,6 +1,52 @@
|
|||
option (USE_INTERNAL_BOOST_LIBRARY "Use internal Boost library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (USE_INTERNAL_BOOST_LIBRARY)
|
||||
if (NOT USE_INTERNAL_BOOST_LIBRARY)
|
||||
# 1.70 like in contrib/boost
|
||||
# 1.71 on CI
|
||||
set(BOOST_VERSION 1.71)
|
||||
|
||||
find_package(Boost ${BOOST_VERSION} COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
iostreams
|
||||
program_options
|
||||
regex
|
||||
)
|
||||
|
||||
if(Boost_INCLUDE_DIR AND Boost_FILESYSTEM_LIBRARY AND Boost_FILESYSTEM_LIBRARY AND
|
||||
Boost_PROGRAM_OPTIONS_LIBRARY AND Boost_REGEX_LIBRARY AND Boost_SYSTEM_LIBRARY)
|
||||
|
||||
set(EXTERNAL_BOOST_FOUND 1)
|
||||
|
||||
add_library (_boost_headers_only INTERFACE)
|
||||
add_library (boost::headers_only ALIAS _boost_headers_only)
|
||||
target_include_directories (_boost_headers_only SYSTEM BEFORE INTERFACE ${Boost_INCLUDE_DIR})
|
||||
|
||||
add_library (_boost_filesystem INTERFACE)
|
||||
add_library (_boost_iostreams INTERFACE)
|
||||
add_library (_boost_program_options INTERFACE)
|
||||
add_library (_boost_regex INTERFACE)
|
||||
add_library (_boost_system INTERFACE)
|
||||
|
||||
target_link_libraries (_boost_filesystem INTERFACE ${Boost_FILESYSTEM_LIBRARY})
|
||||
target_link_libraries (_boost_iostreams INTERFACE ${Boost_IOSTREAMS_LIBRARY})
|
||||
target_link_libraries (_boost_program_options INTERFACE ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries (_boost_regex INTERFACE ${Boost_REGEX_LIBRARY})
|
||||
target_link_libraries (_boost_system INTERFACE ${Boost_SYSTEM_LIBRARY})
|
||||
|
||||
add_library (boost::filesystem ALIAS _boost_filesystem)
|
||||
add_library (boost::iostreams ALIAS _boost_iostreams)
|
||||
add_library (boost::program_options ALIAS _boost_program_options)
|
||||
add_library (boost::regex ALIAS _boost_regex)
|
||||
add_library (boost::system ALIAS _boost_system)
|
||||
else()
|
||||
set(EXTERNAL_BOOST_FOUND 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system boost")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EXTERNAL_BOOST_FOUND)
|
||||
set (USE_INTERNAL_BOOST_LIBRARY 1)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/boost)
|
||||
|
||||
# filesystem
|
||||
|
@ -38,7 +84,7 @@ if (USE_INTERNAL_BOOST_LIBRARY)
|
|||
add_library (_boost_iostreams ${SRCS_IOSTREAMS})
|
||||
add_library (boost::iostreams ALIAS _boost_iostreams)
|
||||
target_include_directories (_boost_iostreams PRIVATE ${LIBRARY_DIR})
|
||||
target_link_libraries (_boost_iostreams PRIVATE zlib)
|
||||
target_link_libraries (_boost_iostreams PRIVATE ${ZLIB_LIBRARIES})
|
||||
|
||||
# program_options
|
||||
|
||||
|
@ -96,38 +142,4 @@ if (USE_INTERNAL_BOOST_LIBRARY)
|
|||
add_library (_boost_system ${SRCS_SYSTEM})
|
||||
add_library (boost::system ALIAS _boost_system)
|
||||
target_include_directories (_boost_system PRIVATE ${LIBRARY_DIR})
|
||||
else ()
|
||||
# 1.70 like in contrib/boost
|
||||
# 1.67 on CI
|
||||
set(BOOST_VERSION 1.67)
|
||||
|
||||
find_package(Boost ${BOOST_VERSION} COMPONENTS
|
||||
system
|
||||
filesystem
|
||||
iostreams
|
||||
program_options
|
||||
regex
|
||||
REQUIRED)
|
||||
|
||||
add_library (_boost_headers_only INTERFACE)
|
||||
add_library (boost::headers_only ALIAS _boost_headers_only)
|
||||
target_include_directories (_boost_headers_only SYSTEM BEFORE INTERFACE ${Boost_INCLUDE_DIR})
|
||||
|
||||
add_library (_boost_filesystem INTERFACE)
|
||||
add_library (_boost_iostreams INTERFACE)
|
||||
add_library (_boost_program_options INTERFACE)
|
||||
add_library (_boost_regex INTERFACE)
|
||||
add_library (_boost_system INTERFACE)
|
||||
|
||||
target_link_libraries (_boost_filesystem INTERFACE ${Boost_FILESYSTEM_LIBRARY})
|
||||
target_link_libraries (_boost_iostreams INTERFACE ${Boost_IOSTREAMS_LIBRARY})
|
||||
target_link_libraries (_boost_program_options INTERFACE ${Boost_PROGRAM_OPTIONS_LIBRARY})
|
||||
target_link_libraries (_boost_regex INTERFACE ${Boost_REGEX_LIBRARY})
|
||||
target_link_libraries (_boost_system INTERFACE ${Boost_SYSTEM_LIBRARY})
|
||||
|
||||
add_library (boost::filesystem ALIAS _boost_filesystem)
|
||||
add_library (boost::iostreams ALIAS _boost_iostreams)
|
||||
add_library (boost::program_options ALIAS _boost_program_options)
|
||||
add_library (boost::regex ALIAS _boost_regex)
|
||||
add_library (boost::system ALIAS _boost_system)
|
||||
endif ()
|
||||
|
|
|
@ -74,12 +74,12 @@ target_link_libraries(capnpc PUBLIC capnp)
|
|||
|
||||
# The library has substandard code
|
||||
if (COMPILER_GCC)
|
||||
set (SUPPRESS_WARNINGS -Wno-non-virtual-dtor -Wno-sign-compare -Wno-strict-aliasing -Wno-maybe-uninitialized
|
||||
-Wno-deprecated-declarations -Wno-class-memaccess)
|
||||
set (SUPPRESS_WARNINGS -w)
|
||||
elseif (COMPILER_CLANG)
|
||||
set (SUPPRESS_WARNINGS -Wno-non-virtual-dtor -Wno-sign-compare -Wno-strict-aliasing -Wno-deprecated-declarations)
|
||||
set (SUPPRESS_WARNINGS -w)
|
||||
set (CAPNP_PRIVATE_CXX_FLAGS -fno-char8_t)
|
||||
endif ()
|
||||
|
||||
target_compile_options(kj PRIVATE ${SUPPRESS_WARNINGS})
|
||||
target_compile_options(capnp PRIVATE ${SUPPRESS_WARNINGS})
|
||||
target_compile_options(capnpc PRIVATE ${SUPPRESS_WARNINGS})
|
||||
target_compile_options(kj PRIVATE ${SUPPRESS_WARNINGS} ${CAPNP_PRIVATE_CXX_FLAGS})
|
||||
target_compile_options(capnp PRIVATE ${SUPPRESS_WARNINGS} ${CAPNP_PRIVATE_CXX_FLAGS})
|
||||
target_compile_options(capnpc PRIVATE ${SUPPRESS_WARNINGS} ${CAPNP_PRIVATE_CXX_FLAGS})
|
||||
|
|
|
@ -1,9 +1,48 @@
|
|||
option (USE_INTERNAL_CCTZ "Use internal cctz library" ${NOT_UNBUNDLED})
|
||||
option (USE_INTERNAL_CCTZ_LIBRARY "Use internal cctz library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (USE_INTERNAL_CCTZ)
|
||||
SET(LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/cctz)
|
||||
if (NOT USE_INTERNAL_CCTZ_LIBRARY)
|
||||
find_library (LIBRARY_CCTZ cctz)
|
||||
find_path (INCLUDE_CCTZ NAMES cctz/civil_time.h)
|
||||
|
||||
SET (SRCS
|
||||
if (LIBRARY_CCTZ AND INCLUDE_CCTZ)
|
||||
set (EXTERNAL_CCTZ_LIBRARY_FOUND 1)
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES ${LIBRARY_CCTZ})
|
||||
set(CMAKE_REQUIRED_INCLUDES ${INCLUDE_CCTZ})
|
||||
check_cxx_source_compiles(
|
||||
"
|
||||
#include <cctz/civil_time.h>
|
||||
int main() {
|
||||
cctz::civil_day date;
|
||||
}
|
||||
"
|
||||
EXTERNAL_CCTZ_LIBRARY_WORKS
|
||||
)
|
||||
|
||||
if (NOT EXTERNAL_CCTZ_LIBRARY_WORKS)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "External cctz is not working: ${LIBRARY_CCTZ} ${INCLUDE_CCTZ}")
|
||||
else()
|
||||
add_library (cctz UNKNOWN IMPORTED)
|
||||
set_property (TARGET cctz PROPERTY IMPORTED_LOCATION ${LIBRARY_CCTZ})
|
||||
set_property (TARGET cctz PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_CCTZ})
|
||||
endif()
|
||||
|
||||
set(SYSTEM_STORAGE_TZ_FILE "${CMAKE_BINARY_DIR}/src/Storages/System/StorageSystemTimeZones.generated.cpp")
|
||||
file(REMOVE ${SYSTEM_STORAGE_TZ_FILE})
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "// autogenerated by ClickHouse/contrib/cctz-cmake/CMakeLists.txt\n")
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "const char * auto_time_zones[] {nullptr};\n" )
|
||||
|
||||
else()
|
||||
set (EXTERNAL_CCTZ_LIBRARY_FOUND 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system cctz")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EXTERNAL_CCTZ_LIBRARY_FOUND OR NOT EXTERNAL_CCTZ_LIBRARY_WORKS)
|
||||
set(USE_INTERNAL_CCTZ_LIBRARY 1)
|
||||
set(LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/cctz)
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/src/civil_time_detail.cc
|
||||
${LIBRARY_DIR}/src/time_zone_fixed.cc
|
||||
${LIBRARY_DIR}/src/time_zone_format.cc
|
||||
|
@ -24,591 +63,51 @@ if (USE_INTERNAL_CCTZ)
|
|||
target_compile_definitions (cctz PRIVATE __USE_BSD linux _XOPEN_SOURCE=600)
|
||||
endif ()
|
||||
|
||||
# Related to time_zones table:
|
||||
# StorageSystemTimeZones.generated.cpp is autogenerated each time during a build
|
||||
# data in this file will be used to populate the system.time_zones table, this is specific to OS_LINUX
|
||||
# as the library that's built using embedded tzdata is also specific to OS_LINUX
|
||||
set(SYSTEM_STORAGE_TZ_FILE "${CMAKE_BINARY_DIR}/src/Storages/System/StorageSystemTimeZones.generated.cpp")
|
||||
# remove existing copies so that its generated fresh on each build.
|
||||
file(REMOVE ${SYSTEM_STORAGE_TZ_FILE})
|
||||
# Build a libray with embedded tzdata
|
||||
|
||||
if (OS_LINUX)
|
||||
|
||||
set (TIMEZONES
|
||||
Africa/Abidjan
|
||||
Africa/Accra
|
||||
Africa/Addis_Ababa
|
||||
Africa/Algiers
|
||||
Africa/Asmara
|
||||
Africa/Asmera
|
||||
Africa/Bamako
|
||||
Africa/Bangui
|
||||
Africa/Banjul
|
||||
Africa/Bissau
|
||||
Africa/Blantyre
|
||||
Africa/Brazzaville
|
||||
Africa/Bujumbura
|
||||
Africa/Cairo
|
||||
Africa/Casablanca
|
||||
Africa/Ceuta
|
||||
Africa/Conakry
|
||||
Africa/Dakar
|
||||
Africa/Dar_es_Salaam
|
||||
Africa/Djibouti
|
||||
Africa/Douala
|
||||
Africa/El_Aaiun
|
||||
Africa/Freetown
|
||||
Africa/Gaborone
|
||||
Africa/Harare
|
||||
Africa/Johannesburg
|
||||
Africa/Juba
|
||||
Africa/Kampala
|
||||
Africa/Khartoum
|
||||
Africa/Kigali
|
||||
Africa/Kinshasa
|
||||
Africa/Lagos
|
||||
Africa/Libreville
|
||||
Africa/Lome
|
||||
Africa/Luanda
|
||||
Africa/Lubumbashi
|
||||
Africa/Lusaka
|
||||
Africa/Malabo
|
||||
Africa/Maputo
|
||||
Africa/Maseru
|
||||
Africa/Mbabane
|
||||
Africa/Mogadishu
|
||||
Africa/Monrovia
|
||||
Africa/Nairobi
|
||||
Africa/Ndjamena
|
||||
Africa/Niamey
|
||||
Africa/Nouakchott
|
||||
Africa/Ouagadougou
|
||||
Africa/Porto-Novo
|
||||
Africa/Sao_Tome
|
||||
Africa/Timbuktu
|
||||
Africa/Tripoli
|
||||
Africa/Tunis
|
||||
Africa/Windhoek
|
||||
America/Adak
|
||||
America/Anchorage
|
||||
America/Anguilla
|
||||
America/Antigua
|
||||
America/Araguaina
|
||||
America/Argentina/Buenos_Aires
|
||||
America/Argentina/Catamarca
|
||||
America/Argentina/ComodRivadavia
|
||||
America/Argentina/Cordoba
|
||||
America/Argentina/Jujuy
|
||||
America/Argentina/La_Rioja
|
||||
America/Argentina/Mendoza
|
||||
America/Argentina/Rio_Gallegos
|
||||
America/Argentina/Salta
|
||||
America/Argentina/San_Juan
|
||||
America/Argentina/San_Luis
|
||||
America/Argentina/Tucuman
|
||||
America/Argentina/Ushuaia
|
||||
America/Aruba
|
||||
America/Asuncion
|
||||
America/Atikokan
|
||||
America/Atka
|
||||
America/Bahia
|
||||
America/Bahia_Banderas
|
||||
America/Barbados
|
||||
America/Belem
|
||||
America/Belize
|
||||
America/Blanc-Sablon
|
||||
America/Boa_Vista
|
||||
America/Bogota
|
||||
America/Boise
|
||||
America/Buenos_Aires
|
||||
America/Cambridge_Bay
|
||||
America/Campo_Grande
|
||||
America/Cancun
|
||||
America/Caracas
|
||||
America/Catamarca
|
||||
America/Cayenne
|
||||
America/Cayman
|
||||
America/Chicago
|
||||
America/Chihuahua
|
||||
America/Coral_Harbour
|
||||
America/Cordoba
|
||||
America/Costa_Rica
|
||||
America/Creston
|
||||
America/Cuiaba
|
||||
America/Curacao
|
||||
America/Danmarkshavn
|
||||
America/Dawson
|
||||
America/Dawson_Creek
|
||||
America/Denver
|
||||
America/Detroit
|
||||
America/Dominica
|
||||
America/Edmonton
|
||||
America/Eirunepe
|
||||
America/El_Salvador
|
||||
America/Ensenada
|
||||
America/Fortaleza
|
||||
America/Fort_Nelson
|
||||
America/Fort_Wayne
|
||||
America/Glace_Bay
|
||||
America/Godthab
|
||||
America/Goose_Bay
|
||||
America/Grand_Turk
|
||||
America/Grenada
|
||||
America/Guadeloupe
|
||||
America/Guatemala
|
||||
America/Guayaquil
|
||||
America/Guyana
|
||||
America/Halifax
|
||||
America/Havana
|
||||
America/Hermosillo
|
||||
America/Indiana/Indianapolis
|
||||
America/Indiana/Knox
|
||||
America/Indiana/Marengo
|
||||
America/Indiana/Petersburg
|
||||
America/Indianapolis
|
||||
America/Indiana/Tell_City
|
||||
America/Indiana/Vevay
|
||||
America/Indiana/Vincennes
|
||||
America/Indiana/Winamac
|
||||
America/Inuvik
|
||||
America/Iqaluit
|
||||
America/Jamaica
|
||||
America/Jujuy
|
||||
America/Juneau
|
||||
America/Kentucky/Louisville
|
||||
America/Kentucky/Monticello
|
||||
America/Knox_IN
|
||||
America/Kralendijk
|
||||
America/La_Paz
|
||||
America/Lima
|
||||
America/Los_Angeles
|
||||
America/Louisville
|
||||
America/Lower_Princes
|
||||
America/Maceio
|
||||
America/Managua
|
||||
America/Manaus
|
||||
America/Marigot
|
||||
America/Martinique
|
||||
America/Matamoros
|
||||
America/Mazatlan
|
||||
America/Mendoza
|
||||
America/Menominee
|
||||
America/Merida
|
||||
America/Metlakatla
|
||||
America/Mexico_City
|
||||
America/Miquelon
|
||||
America/Moncton
|
||||
America/Monterrey
|
||||
America/Montevideo
|
||||
America/Montreal
|
||||
America/Montserrat
|
||||
America/Nassau
|
||||
America/New_York
|
||||
America/Nipigon
|
||||
America/Nome
|
||||
America/Noronha
|
||||
America/North_Dakota/Beulah
|
||||
America/North_Dakota/Center
|
||||
America/North_Dakota/New_Salem
|
||||
America/Ojinaga
|
||||
America/Panama
|
||||
America/Pangnirtung
|
||||
America/Paramaribo
|
||||
America/Phoenix
|
||||
America/Port-au-Prince
|
||||
America/Porto_Acre
|
||||
America/Port_of_Spain
|
||||
America/Porto_Velho
|
||||
America/Puerto_Rico
|
||||
America/Punta_Arenas
|
||||
America/Rainy_River
|
||||
America/Rankin_Inlet
|
||||
America/Recife
|
||||
America/Regina
|
||||
America/Resolute
|
||||
America/Rio_Branco
|
||||
America/Rosario
|
||||
America/Santa_Isabel
|
||||
America/Santarem
|
||||
America/Santiago
|
||||
America/Santo_Domingo
|
||||
America/Sao_Paulo
|
||||
America/Scoresbysund
|
||||
America/Shiprock
|
||||
America/Sitka
|
||||
America/St_Barthelemy
|
||||
America/St_Johns
|
||||
America/St_Kitts
|
||||
America/St_Lucia
|
||||
America/St_Thomas
|
||||
America/St_Vincent
|
||||
America/Swift_Current
|
||||
America/Tegucigalpa
|
||||
America/Thule
|
||||
America/Thunder_Bay
|
||||
America/Tijuana
|
||||
America/Toronto
|
||||
America/Tortola
|
||||
America/Vancouver
|
||||
America/Virgin
|
||||
America/Whitehorse
|
||||
America/Winnipeg
|
||||
America/Yakutat
|
||||
America/Yellowknife
|
||||
Antarctica/Casey
|
||||
Antarctica/Davis
|
||||
Antarctica/DumontDUrville
|
||||
Antarctica/Macquarie
|
||||
Antarctica/Mawson
|
||||
Antarctica/McMurdo
|
||||
Antarctica/Palmer
|
||||
Antarctica/Rothera
|
||||
Antarctica/South_Pole
|
||||
Antarctica/Syowa
|
||||
Antarctica/Troll
|
||||
Antarctica/Vostok
|
||||
Arctic/Longyearbyen
|
||||
Asia/Aden
|
||||
Asia/Almaty
|
||||
Asia/Amman
|
||||
Asia/Anadyr
|
||||
Asia/Aqtau
|
||||
Asia/Aqtobe
|
||||
Asia/Ashgabat
|
||||
Asia/Ashkhabad
|
||||
Asia/Atyrau
|
||||
Asia/Baghdad
|
||||
Asia/Bahrain
|
||||
Asia/Baku
|
||||
Asia/Bangkok
|
||||
Asia/Barnaul
|
||||
Asia/Beirut
|
||||
Asia/Bishkek
|
||||
Asia/Brunei
|
||||
Asia/Calcutta
|
||||
Asia/Chita
|
||||
Asia/Choibalsan
|
||||
Asia/Chongqing
|
||||
Asia/Chungking
|
||||
Asia/Colombo
|
||||
Asia/Dacca
|
||||
Asia/Damascus
|
||||
Asia/Dhaka
|
||||
Asia/Dili
|
||||
Asia/Dubai
|
||||
Asia/Dushanbe
|
||||
Asia/Famagusta
|
||||
Asia/Gaza
|
||||
Asia/Harbin
|
||||
Asia/Hebron
|
||||
Asia/Ho_Chi_Minh
|
||||
Asia/Hong_Kong
|
||||
Asia/Hovd
|
||||
Asia/Irkutsk
|
||||
Asia/Istanbul
|
||||
Asia/Jakarta
|
||||
Asia/Jayapura
|
||||
Asia/Jerusalem
|
||||
Asia/Kabul
|
||||
Asia/Kamchatka
|
||||
Asia/Karachi
|
||||
Asia/Kashgar
|
||||
Asia/Kathmandu
|
||||
Asia/Katmandu
|
||||
Asia/Khandyga
|
||||
Asia/Kolkata
|
||||
Asia/Krasnoyarsk
|
||||
Asia/Kuala_Lumpur
|
||||
Asia/Kuching
|
||||
Asia/Kuwait
|
||||
Asia/Macao
|
||||
Asia/Macau
|
||||
Asia/Magadan
|
||||
Asia/Makassar
|
||||
Asia/Manila
|
||||
Asia/Muscat
|
||||
Asia/Nicosia
|
||||
Asia/Novokuznetsk
|
||||
Asia/Novosibirsk
|
||||
Asia/Omsk
|
||||
Asia/Oral
|
||||
Asia/Phnom_Penh
|
||||
Asia/Pontianak
|
||||
Asia/Pyongyang
|
||||
Asia/Qatar
|
||||
Asia/Qostanay
|
||||
Asia/Qyzylorda
|
||||
Asia/Rangoon
|
||||
Asia/Riyadh
|
||||
Asia/Saigon
|
||||
Asia/Sakhalin
|
||||
Asia/Samarkand
|
||||
Asia/Seoul
|
||||
Asia/Shanghai
|
||||
Asia/Singapore
|
||||
Asia/Srednekolymsk
|
||||
Asia/Taipei
|
||||
Asia/Tashkent
|
||||
Asia/Tbilisi
|
||||
Asia/Tehran
|
||||
Asia/Tel_Aviv
|
||||
Asia/Thimbu
|
||||
Asia/Thimphu
|
||||
Asia/Tokyo
|
||||
Asia/Tomsk
|
||||
Asia/Ujung_Pandang
|
||||
Asia/Ulaanbaatar
|
||||
Asia/Ulan_Bator
|
||||
Asia/Urumqi
|
||||
Asia/Ust-Nera
|
||||
Asia/Vientiane
|
||||
Asia/Vladivostok
|
||||
Asia/Yakutsk
|
||||
Asia/Yangon
|
||||
Asia/Yekaterinburg
|
||||
Asia/Yerevan
|
||||
Atlantic/Azores
|
||||
Atlantic/Bermuda
|
||||
Atlantic/Canary
|
||||
Atlantic/Cape_Verde
|
||||
Atlantic/Faeroe
|
||||
Atlantic/Faroe
|
||||
Atlantic/Jan_Mayen
|
||||
Atlantic/Madeira
|
||||
Atlantic/Reykjavik
|
||||
Atlantic/South_Georgia
|
||||
Atlantic/Stanley
|
||||
Atlantic/St_Helena
|
||||
Australia/ACT
|
||||
Australia/Adelaide
|
||||
Australia/Brisbane
|
||||
Australia/Broken_Hill
|
||||
Australia/Canberra
|
||||
Australia/Currie
|
||||
Australia/Darwin
|
||||
Australia/Eucla
|
||||
Australia/Hobart
|
||||
Australia/LHI
|
||||
Australia/Lindeman
|
||||
Australia/Lord_Howe
|
||||
Australia/Melbourne
|
||||
Australia/North
|
||||
Australia/NSW
|
||||
Australia/Perth
|
||||
Australia/Queensland
|
||||
Australia/South
|
||||
Australia/Sydney
|
||||
Australia/Tasmania
|
||||
Australia/Victoria
|
||||
Australia/West
|
||||
Australia/Yancowinna
|
||||
Brazil/Acre
|
||||
Brazil/DeNoronha
|
||||
Brazil/East
|
||||
Brazil/West
|
||||
Canada/Atlantic
|
||||
Canada/Central
|
||||
Canada/Eastern
|
||||
Canada/Mountain
|
||||
Canada/Newfoundland
|
||||
Canada/Pacific
|
||||
Canada/Saskatchewan
|
||||
Canada/Yukon
|
||||
CET
|
||||
Chile/Continental
|
||||
Chile/EasterIsland
|
||||
CST6CDT
|
||||
Cuba
|
||||
EET
|
||||
Egypt
|
||||
Eire
|
||||
EST
|
||||
EST5EDT
|
||||
Etc/GMT
|
||||
Etc/Greenwich
|
||||
Etc/UCT
|
||||
Etc/Universal
|
||||
Etc/UTC
|
||||
Etc/Zulu
|
||||
Europe/Amsterdam
|
||||
Europe/Andorra
|
||||
Europe/Astrakhan
|
||||
Europe/Athens
|
||||
Europe/Belfast
|
||||
Europe/Belgrade
|
||||
Europe/Berlin
|
||||
Europe/Bratislava
|
||||
Europe/Brussels
|
||||
Europe/Bucharest
|
||||
Europe/Budapest
|
||||
Europe/Busingen
|
||||
Europe/Chisinau
|
||||
Europe/Copenhagen
|
||||
Europe/Dublin
|
||||
Europe/Gibraltar
|
||||
Europe/Guernsey
|
||||
Europe/Helsinki
|
||||
Europe/Isle_of_Man
|
||||
Europe/Istanbul
|
||||
Europe/Jersey
|
||||
Europe/Kaliningrad
|
||||
Europe/Kiev
|
||||
Europe/Kirov
|
||||
Europe/Lisbon
|
||||
Europe/Ljubljana
|
||||
Europe/London
|
||||
Europe/Luxembourg
|
||||
Europe/Madrid
|
||||
Europe/Malta
|
||||
Europe/Mariehamn
|
||||
Europe/Minsk
|
||||
Europe/Monaco
|
||||
Europe/Moscow
|
||||
Europe/Nicosia
|
||||
Europe/Oslo
|
||||
Europe/Paris
|
||||
Europe/Podgorica
|
||||
Europe/Prague
|
||||
Europe/Riga
|
||||
Europe/Rome
|
||||
Europe/Samara
|
||||
Europe/San_Marino
|
||||
Europe/Sarajevo
|
||||
Europe/Saratov
|
||||
Europe/Simferopol
|
||||
Europe/Skopje
|
||||
Europe/Sofia
|
||||
Europe/Stockholm
|
||||
Europe/Tallinn
|
||||
Europe/Tirane
|
||||
Europe/Tiraspol
|
||||
Europe/Ulyanovsk
|
||||
Europe/Uzhgorod
|
||||
Europe/Vaduz
|
||||
Europe/Vatican
|
||||
Europe/Vienna
|
||||
Europe/Vilnius
|
||||
Europe/Volgograd
|
||||
Europe/Warsaw
|
||||
Europe/Zagreb
|
||||
Europe/Zaporozhye
|
||||
Europe/Zurich
|
||||
Factory
|
||||
GB
|
||||
GB-Eire
|
||||
GMT
|
||||
GMT0
|
||||
Greenwich
|
||||
Hongkong
|
||||
HST
|
||||
Iceland
|
||||
Indian/Antananarivo
|
||||
Indian/Chagos
|
||||
Indian/Christmas
|
||||
Indian/Cocos
|
||||
Indian/Comoro
|
||||
Indian/Kerguelen
|
||||
Indian/Mahe
|
||||
Indian/Maldives
|
||||
Indian/Mauritius
|
||||
Indian/Mayotte
|
||||
Indian/Reunion
|
||||
Iran
|
||||
Israel
|
||||
Jamaica
|
||||
Japan
|
||||
Kwajalein
|
||||
Libya
|
||||
MET
|
||||
Mexico/BajaNorte
|
||||
Mexico/BajaSur
|
||||
Mexico/General
|
||||
MST
|
||||
MST7MDT
|
||||
Navajo
|
||||
NZ
|
||||
NZ-CHAT
|
||||
Pacific/Apia
|
||||
Pacific/Auckland
|
||||
Pacific/Bougainville
|
||||
Pacific/Chatham
|
||||
Pacific/Chuuk
|
||||
Pacific/Easter
|
||||
Pacific/Efate
|
||||
Pacific/Enderbury
|
||||
Pacific/Fakaofo
|
||||
Pacific/Fiji
|
||||
Pacific/Funafuti
|
||||
Pacific/Galapagos
|
||||
Pacific/Gambier
|
||||
Pacific/Guadalcanal
|
||||
Pacific/Guam
|
||||
Pacific/Honolulu
|
||||
Pacific/Johnston
|
||||
Pacific/Kiritimati
|
||||
Pacific/Kosrae
|
||||
Pacific/Kwajalein
|
||||
Pacific/Majuro
|
||||
Pacific/Marquesas
|
||||
Pacific/Midway
|
||||
Pacific/Nauru
|
||||
Pacific/Niue
|
||||
Pacific/Norfolk
|
||||
Pacific/Noumea
|
||||
Pacific/Pago_Pago
|
||||
Pacific/Palau
|
||||
Pacific/Pitcairn
|
||||
Pacific/Pohnpei
|
||||
Pacific/Ponape
|
||||
Pacific/Port_Moresby
|
||||
Pacific/Rarotonga
|
||||
Pacific/Saipan
|
||||
Pacific/Samoa
|
||||
Pacific/Tahiti
|
||||
Pacific/Tarawa
|
||||
Pacific/Tongatapu
|
||||
Pacific/Truk
|
||||
Pacific/Wake
|
||||
Pacific/Wallis
|
||||
Pacific/Yap
|
||||
Poland
|
||||
Portugal
|
||||
PRC
|
||||
PST8PDT
|
||||
ROC
|
||||
ROK
|
||||
Singapore
|
||||
Turkey
|
||||
UCT
|
||||
Universal
|
||||
US/Alaska
|
||||
US/Aleutian
|
||||
US/Arizona
|
||||
US/Central
|
||||
US/Eastern
|
||||
US/East-Indiana
|
||||
US/Hawaii
|
||||
US/Indiana-Starke
|
||||
US/Michigan
|
||||
US/Mountain
|
||||
US/Pacific
|
||||
US/Samoa
|
||||
UTC
|
||||
WET
|
||||
W-SU
|
||||
Zulu)
|
||||
|
||||
# get the list of timezones from tzdata shipped with cctz
|
||||
set(TZDIR ${LIBRARY_DIR}/testdata/zoneinfo)
|
||||
file(STRINGS ${LIBRARY_DIR}/testdata/version TZDATA_VERSION)
|
||||
set_property(GLOBAL PROPERTY TZDATA_VERSION_PROP "${TZDATA_VERSION}")
|
||||
message(STATUS "Packaging with tzdata version: ${TZDATA_VERSION}")
|
||||
|
||||
set(TZ_OBJS)
|
||||
|
||||
# each file in that dir (except of tab and localtime) store the info about timezone
|
||||
execute_process(COMMAND
|
||||
bash -c "cd ${TZDIR} && find * -type f -and ! -name '*.tab' -and ! -name 'localtime' | sort | paste -sd ';'"
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
OUTPUT_VARIABLE TIMEZONES)
|
||||
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "// autogenerated by ClickHouse/contrib/cctz-cmake/CMakeLists.txt\n")
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "const char * auto_time_zones[] {\n" )
|
||||
|
||||
foreach(TIMEZONE ${TIMEZONES})
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} " \"${TIMEZONE}\",\n")
|
||||
string(REPLACE "/" "_" TIMEZONE_ID ${TIMEZONE})
|
||||
string(REPLACE "+" "_PLUS_" TIMEZONE_ID ${TIMEZONE_ID})
|
||||
set(TZ_OBJ ${TIMEZONE_ID}.o)
|
||||
set(TZ_OBJS ${TZ_OBJS} ${TZ_OBJ})
|
||||
|
||||
# https://stackoverflow.com/questions/14776463/compile-and-add-an-object-file-from-a-binary-with-cmake
|
||||
add_custom_command(OUTPUT ${TZ_OBJ}
|
||||
COMMAND cd ${TZDIR} && ${OBJCOPY_PATH} -I binary ${OBJCOPY_ARCH_OPTIONS} ${TIMEZONE} ${CMAKE_CURRENT_BINARY_DIR}/${TZ_OBJ}
|
||||
COMMAND ${OBJCOPY_PATH} --rename-section .data=.rodata,alloc,load,readonly,data,contents
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${TZ_OBJ} ${CMAKE_CURRENT_BINARY_DIR}/${TZ_OBJ})
|
||||
COMMAND cp ${TZDIR}/${TIMEZONE} ${CMAKE_CURRENT_BINARY_DIR}/${TIMEZONE_ID}
|
||||
COMMAND cd ${CMAKE_CURRENT_BINARY_DIR} && ${OBJCOPY_PATH} -I binary ${OBJCOPY_ARCH_OPTIONS}
|
||||
--rename-section .data=.rodata,alloc,load,readonly,data,contents ${TIMEZONE_ID} ${TZ_OBJ}
|
||||
COMMAND rm ${CMAKE_CURRENT_BINARY_DIR}/${TIMEZONE_ID})
|
||||
|
||||
set_source_files_properties(${TZ_OBJ} PROPERTIES EXTERNAL_OBJECT true GENERATED true)
|
||||
endforeach(TIMEZONE)
|
||||
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} " nullptr};\n")
|
||||
|
||||
add_library(tzdata STATIC ${TZ_OBJS})
|
||||
set_target_properties(tzdata PROPERTIES LINKER_LANGUAGE C)
|
||||
# whole-archive prevents symbols from being discarded for unknown reason
|
||||
|
@ -617,29 +116,9 @@ if (USE_INTERNAL_CCTZ)
|
|||
# library into single string.
|
||||
add_dependencies(cctz tzdata)
|
||||
target_link_libraries(cctz INTERFACE "-Wl,${WHOLE_ARCHIVE} $<TARGET_FILE:tzdata> -Wl,${NO_WHOLE_ARCHIVE}")
|
||||
endif ()
|
||||
|
||||
else ()
|
||||
find_library (LIBRARY_CCTZ cctz)
|
||||
find_path (INCLUDE_CCTZ NAMES cctz/civil_time.h)
|
||||
|
||||
add_library (cctz UNKNOWN IMPORTED)
|
||||
set_property (TARGET cctz PROPERTY IMPORTED_LOCATION ${LIBRARY_CCTZ})
|
||||
set_property (TARGET cctz PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_CCTZ})
|
||||
|
||||
set(CMAKE_REQUIRED_LIBRARIES cctz)
|
||||
check_cxx_source_compiles(
|
||||
"
|
||||
#include <cctz/civil_time.h>
|
||||
int main() {
|
||||
cctz::civil_day date;
|
||||
}
|
||||
"
|
||||
EXTERNAL_CCTZ_WORKS
|
||||
)
|
||||
|
||||
if (NOT EXTERNAL_CCTZ_WORKS)
|
||||
message (FATAL_ERROR "cctz is unusable: ${LIBRARY_CCTZ} ${INCLUDE_CCTZ}")
|
||||
else ()
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "// autogenerated by ClickHouse/contrib/cctz-cmake/CMakeLists.txt\n")
|
||||
file(APPEND ${SYSTEM_STORAGE_TZ_FILE} "const char * auto_time_zones[] {nullptr};\n" )
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
|
|
|
@ -1,187 +1,179 @@
|
|||
option (ENABLE_CURL "Enable curl" ${ENABLE_LIBRARIES})
|
||||
if (NOT USE_INTERNAL_CURL)
|
||||
return()
|
||||
endif()
|
||||
|
||||
if (ENABLE_CURL)
|
||||
option (USE_INTERNAL_CURL "Use internal curl library" ${NOT_UNBUNDLED})
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/curl")
|
||||
|
||||
if (USE_INTERNAL_CURL)
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/curl")
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/lib/file.c
|
||||
${LIBRARY_DIR}/lib/timeval.c
|
||||
${LIBRARY_DIR}/lib/base64.c
|
||||
${LIBRARY_DIR}/lib/hostip.c
|
||||
${LIBRARY_DIR}/lib/progress.c
|
||||
${LIBRARY_DIR}/lib/formdata.c
|
||||
${LIBRARY_DIR}/lib/cookie.c
|
||||
${LIBRARY_DIR}/lib/http.c
|
||||
${LIBRARY_DIR}/lib/sendf.c
|
||||
${LIBRARY_DIR}/lib/url.c
|
||||
${LIBRARY_DIR}/lib/dict.c
|
||||
${LIBRARY_DIR}/lib/if2ip.c
|
||||
${LIBRARY_DIR}/lib/speedcheck.c
|
||||
${LIBRARY_DIR}/lib/ldap.c
|
||||
${LIBRARY_DIR}/lib/version.c
|
||||
${LIBRARY_DIR}/lib/getenv.c
|
||||
${LIBRARY_DIR}/lib/escape.c
|
||||
${LIBRARY_DIR}/lib/mprintf.c
|
||||
${LIBRARY_DIR}/lib/telnet.c
|
||||
${LIBRARY_DIR}/lib/netrc.c
|
||||
${LIBRARY_DIR}/lib/getinfo.c
|
||||
${LIBRARY_DIR}/lib/transfer.c
|
||||
${LIBRARY_DIR}/lib/strcase.c
|
||||
${LIBRARY_DIR}/lib/easy.c
|
||||
${LIBRARY_DIR}/lib/security.c
|
||||
${LIBRARY_DIR}/lib/curl_fnmatch.c
|
||||
${LIBRARY_DIR}/lib/fileinfo.c
|
||||
${LIBRARY_DIR}/lib/wildcard.c
|
||||
${LIBRARY_DIR}/lib/krb5.c
|
||||
${LIBRARY_DIR}/lib/memdebug.c
|
||||
${LIBRARY_DIR}/lib/http_chunks.c
|
||||
${LIBRARY_DIR}/lib/strtok.c
|
||||
${LIBRARY_DIR}/lib/connect.c
|
||||
${LIBRARY_DIR}/lib/llist.c
|
||||
${LIBRARY_DIR}/lib/hash.c
|
||||
${LIBRARY_DIR}/lib/multi.c
|
||||
${LIBRARY_DIR}/lib/content_encoding.c
|
||||
${LIBRARY_DIR}/lib/share.c
|
||||
${LIBRARY_DIR}/lib/http_digest.c
|
||||
${LIBRARY_DIR}/lib/md4.c
|
||||
${LIBRARY_DIR}/lib/md5.c
|
||||
${LIBRARY_DIR}/lib/http_negotiate.c
|
||||
${LIBRARY_DIR}/lib/inet_pton.c
|
||||
${LIBRARY_DIR}/lib/strtoofft.c
|
||||
${LIBRARY_DIR}/lib/strerror.c
|
||||
${LIBRARY_DIR}/lib/amigaos.c
|
||||
${LIBRARY_DIR}/lib/hostasyn.c
|
||||
${LIBRARY_DIR}/lib/hostip4.c
|
||||
${LIBRARY_DIR}/lib/hostip6.c
|
||||
${LIBRARY_DIR}/lib/hostsyn.c
|
||||
${LIBRARY_DIR}/lib/inet_ntop.c
|
||||
${LIBRARY_DIR}/lib/parsedate.c
|
||||
${LIBRARY_DIR}/lib/select.c
|
||||
${LIBRARY_DIR}/lib/splay.c
|
||||
${LIBRARY_DIR}/lib/strdup.c
|
||||
${LIBRARY_DIR}/lib/socks.c
|
||||
${LIBRARY_DIR}/lib/curl_addrinfo.c
|
||||
${LIBRARY_DIR}/lib/socks_gssapi.c
|
||||
${LIBRARY_DIR}/lib/socks_sspi.c
|
||||
${LIBRARY_DIR}/lib/curl_sspi.c
|
||||
${LIBRARY_DIR}/lib/slist.c
|
||||
${LIBRARY_DIR}/lib/nonblock.c
|
||||
${LIBRARY_DIR}/lib/curl_memrchr.c
|
||||
${LIBRARY_DIR}/lib/imap.c
|
||||
${LIBRARY_DIR}/lib/pop3.c
|
||||
${LIBRARY_DIR}/lib/smtp.c
|
||||
${LIBRARY_DIR}/lib/pingpong.c
|
||||
${LIBRARY_DIR}/lib/rtsp.c
|
||||
${LIBRARY_DIR}/lib/curl_threads.c
|
||||
${LIBRARY_DIR}/lib/warnless.c
|
||||
${LIBRARY_DIR}/lib/hmac.c
|
||||
${LIBRARY_DIR}/lib/curl_rtmp.c
|
||||
${LIBRARY_DIR}/lib/openldap.c
|
||||
${LIBRARY_DIR}/lib/curl_gethostname.c
|
||||
${LIBRARY_DIR}/lib/gopher.c
|
||||
${LIBRARY_DIR}/lib/idn_win32.c
|
||||
${LIBRARY_DIR}/lib/http_proxy.c
|
||||
${LIBRARY_DIR}/lib/non-ascii.c
|
||||
${LIBRARY_DIR}/lib/asyn-thread.c
|
||||
${LIBRARY_DIR}/lib/curl_gssapi.c
|
||||
${LIBRARY_DIR}/lib/http_ntlm.c
|
||||
${LIBRARY_DIR}/lib/curl_ntlm_wb.c
|
||||
${LIBRARY_DIR}/lib/curl_ntlm_core.c
|
||||
${LIBRARY_DIR}/lib/curl_sasl.c
|
||||
${LIBRARY_DIR}/lib/rand.c
|
||||
${LIBRARY_DIR}/lib/curl_multibyte.c
|
||||
${LIBRARY_DIR}/lib/hostcheck.c
|
||||
${LIBRARY_DIR}/lib/conncache.c
|
||||
${LIBRARY_DIR}/lib/dotdot.c
|
||||
${LIBRARY_DIR}/lib/x509asn1.c
|
||||
${LIBRARY_DIR}/lib/http2.c
|
||||
${LIBRARY_DIR}/lib/smb.c
|
||||
${LIBRARY_DIR}/lib/curl_endian.c
|
||||
${LIBRARY_DIR}/lib/curl_des.c
|
||||
${LIBRARY_DIR}/lib/system_win32.c
|
||||
${LIBRARY_DIR}/lib/mime.c
|
||||
${LIBRARY_DIR}/lib/sha256.c
|
||||
${LIBRARY_DIR}/lib/setopt.c
|
||||
${LIBRARY_DIR}/lib/curl_path.c
|
||||
${LIBRARY_DIR}/lib/curl_ctype.c
|
||||
${LIBRARY_DIR}/lib/curl_range.c
|
||||
${LIBRARY_DIR}/lib/psl.c
|
||||
${LIBRARY_DIR}/lib/doh.c
|
||||
${LIBRARY_DIR}/lib/urlapi.c
|
||||
${LIBRARY_DIR}/lib/curl_get_line.c
|
||||
${LIBRARY_DIR}/lib/altsvc.c
|
||||
${LIBRARY_DIR}/lib/socketpair.c
|
||||
${LIBRARY_DIR}/lib/vauth/vauth.c
|
||||
${LIBRARY_DIR}/lib/vauth/cleartext.c
|
||||
${LIBRARY_DIR}/lib/vauth/cram.c
|
||||
${LIBRARY_DIR}/lib/vauth/digest.c
|
||||
${LIBRARY_DIR}/lib/vauth/digest_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/krb5_gssapi.c
|
||||
${LIBRARY_DIR}/lib/vauth/krb5_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/ntlm.c
|
||||
${LIBRARY_DIR}/lib/vauth/ntlm_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/oauth2.c
|
||||
${LIBRARY_DIR}/lib/vauth/spnego_gssapi.c
|
||||
${LIBRARY_DIR}/lib/vauth/spnego_sspi.c
|
||||
${LIBRARY_DIR}/lib/vtls/openssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/gtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/vtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/nss.c
|
||||
${LIBRARY_DIR}/lib/vtls/polarssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/polarssl_threadlock.c
|
||||
${LIBRARY_DIR}/lib/vtls/wolfssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/schannel.c
|
||||
${LIBRARY_DIR}/lib/vtls/schannel_verify.c
|
||||
${LIBRARY_DIR}/lib/vtls/sectransp.c
|
||||
${LIBRARY_DIR}/lib/vtls/gskit.c
|
||||
${LIBRARY_DIR}/lib/vtls/mbedtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/mesalink.c
|
||||
${LIBRARY_DIR}/lib/vtls/bearssl.c
|
||||
${LIBRARY_DIR}/lib/vquic/ngtcp2.c
|
||||
${LIBRARY_DIR}/lib/vquic/quiche.c
|
||||
${LIBRARY_DIR}/lib/vssh/libssh2.c
|
||||
${LIBRARY_DIR}/lib/vssh/libssh.c
|
||||
)
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/lib/file.c
|
||||
${LIBRARY_DIR}/lib/timeval.c
|
||||
${LIBRARY_DIR}/lib/base64.c
|
||||
${LIBRARY_DIR}/lib/hostip.c
|
||||
${LIBRARY_DIR}/lib/progress.c
|
||||
${LIBRARY_DIR}/lib/formdata.c
|
||||
${LIBRARY_DIR}/lib/cookie.c
|
||||
${LIBRARY_DIR}/lib/http.c
|
||||
${LIBRARY_DIR}/lib/sendf.c
|
||||
${LIBRARY_DIR}/lib/url.c
|
||||
${LIBRARY_DIR}/lib/dict.c
|
||||
${LIBRARY_DIR}/lib/if2ip.c
|
||||
${LIBRARY_DIR}/lib/speedcheck.c
|
||||
${LIBRARY_DIR}/lib/ldap.c
|
||||
${LIBRARY_DIR}/lib/version.c
|
||||
${LIBRARY_DIR}/lib/getenv.c
|
||||
${LIBRARY_DIR}/lib/escape.c
|
||||
${LIBRARY_DIR}/lib/mprintf.c
|
||||
${LIBRARY_DIR}/lib/telnet.c
|
||||
${LIBRARY_DIR}/lib/netrc.c
|
||||
${LIBRARY_DIR}/lib/getinfo.c
|
||||
${LIBRARY_DIR}/lib/transfer.c
|
||||
${LIBRARY_DIR}/lib/strcase.c
|
||||
${LIBRARY_DIR}/lib/easy.c
|
||||
${LIBRARY_DIR}/lib/security.c
|
||||
${LIBRARY_DIR}/lib/curl_fnmatch.c
|
||||
${LIBRARY_DIR}/lib/fileinfo.c
|
||||
${LIBRARY_DIR}/lib/wildcard.c
|
||||
${LIBRARY_DIR}/lib/krb5.c
|
||||
${LIBRARY_DIR}/lib/memdebug.c
|
||||
${LIBRARY_DIR}/lib/http_chunks.c
|
||||
${LIBRARY_DIR}/lib/strtok.c
|
||||
${LIBRARY_DIR}/lib/connect.c
|
||||
${LIBRARY_DIR}/lib/llist.c
|
||||
${LIBRARY_DIR}/lib/hash.c
|
||||
${LIBRARY_DIR}/lib/multi.c
|
||||
${LIBRARY_DIR}/lib/content_encoding.c
|
||||
${LIBRARY_DIR}/lib/share.c
|
||||
${LIBRARY_DIR}/lib/http_digest.c
|
||||
${LIBRARY_DIR}/lib/md4.c
|
||||
${LIBRARY_DIR}/lib/md5.c
|
||||
${LIBRARY_DIR}/lib/http_negotiate.c
|
||||
${LIBRARY_DIR}/lib/inet_pton.c
|
||||
${LIBRARY_DIR}/lib/strtoofft.c
|
||||
${LIBRARY_DIR}/lib/strerror.c
|
||||
${LIBRARY_DIR}/lib/amigaos.c
|
||||
${LIBRARY_DIR}/lib/hostasyn.c
|
||||
${LIBRARY_DIR}/lib/hostip4.c
|
||||
${LIBRARY_DIR}/lib/hostip6.c
|
||||
${LIBRARY_DIR}/lib/hostsyn.c
|
||||
${LIBRARY_DIR}/lib/inet_ntop.c
|
||||
${LIBRARY_DIR}/lib/parsedate.c
|
||||
${LIBRARY_DIR}/lib/select.c
|
||||
${LIBRARY_DIR}/lib/splay.c
|
||||
${LIBRARY_DIR}/lib/strdup.c
|
||||
${LIBRARY_DIR}/lib/socks.c
|
||||
${LIBRARY_DIR}/lib/curl_addrinfo.c
|
||||
${LIBRARY_DIR}/lib/socks_gssapi.c
|
||||
${LIBRARY_DIR}/lib/socks_sspi.c
|
||||
${LIBRARY_DIR}/lib/curl_sspi.c
|
||||
${LIBRARY_DIR}/lib/slist.c
|
||||
${LIBRARY_DIR}/lib/nonblock.c
|
||||
${LIBRARY_DIR}/lib/curl_memrchr.c
|
||||
${LIBRARY_DIR}/lib/imap.c
|
||||
${LIBRARY_DIR}/lib/pop3.c
|
||||
${LIBRARY_DIR}/lib/smtp.c
|
||||
${LIBRARY_DIR}/lib/pingpong.c
|
||||
${LIBRARY_DIR}/lib/rtsp.c
|
||||
${LIBRARY_DIR}/lib/curl_threads.c
|
||||
${LIBRARY_DIR}/lib/warnless.c
|
||||
${LIBRARY_DIR}/lib/hmac.c
|
||||
${LIBRARY_DIR}/lib/curl_rtmp.c
|
||||
${LIBRARY_DIR}/lib/openldap.c
|
||||
${LIBRARY_DIR}/lib/curl_gethostname.c
|
||||
${LIBRARY_DIR}/lib/gopher.c
|
||||
${LIBRARY_DIR}/lib/idn_win32.c
|
||||
${LIBRARY_DIR}/lib/http_proxy.c
|
||||
${LIBRARY_DIR}/lib/non-ascii.c
|
||||
${LIBRARY_DIR}/lib/asyn-thread.c
|
||||
${LIBRARY_DIR}/lib/curl_gssapi.c
|
||||
${LIBRARY_DIR}/lib/http_ntlm.c
|
||||
${LIBRARY_DIR}/lib/curl_ntlm_wb.c
|
||||
${LIBRARY_DIR}/lib/curl_ntlm_core.c
|
||||
${LIBRARY_DIR}/lib/curl_sasl.c
|
||||
${LIBRARY_DIR}/lib/rand.c
|
||||
${LIBRARY_DIR}/lib/curl_multibyte.c
|
||||
${LIBRARY_DIR}/lib/hostcheck.c
|
||||
${LIBRARY_DIR}/lib/conncache.c
|
||||
${LIBRARY_DIR}/lib/dotdot.c
|
||||
${LIBRARY_DIR}/lib/x509asn1.c
|
||||
${LIBRARY_DIR}/lib/http2.c
|
||||
${LIBRARY_DIR}/lib/smb.c
|
||||
${LIBRARY_DIR}/lib/curl_endian.c
|
||||
${LIBRARY_DIR}/lib/curl_des.c
|
||||
${LIBRARY_DIR}/lib/system_win32.c
|
||||
${LIBRARY_DIR}/lib/mime.c
|
||||
${LIBRARY_DIR}/lib/sha256.c
|
||||
${LIBRARY_DIR}/lib/setopt.c
|
||||
${LIBRARY_DIR}/lib/curl_path.c
|
||||
${LIBRARY_DIR}/lib/curl_ctype.c
|
||||
${LIBRARY_DIR}/lib/curl_range.c
|
||||
${LIBRARY_DIR}/lib/psl.c
|
||||
${LIBRARY_DIR}/lib/doh.c
|
||||
${LIBRARY_DIR}/lib/urlapi.c
|
||||
${LIBRARY_DIR}/lib/curl_get_line.c
|
||||
${LIBRARY_DIR}/lib/altsvc.c
|
||||
${LIBRARY_DIR}/lib/socketpair.c
|
||||
${LIBRARY_DIR}/lib/vauth/vauth.c
|
||||
${LIBRARY_DIR}/lib/vauth/cleartext.c
|
||||
${LIBRARY_DIR}/lib/vauth/cram.c
|
||||
${LIBRARY_DIR}/lib/vauth/digest.c
|
||||
${LIBRARY_DIR}/lib/vauth/digest_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/krb5_gssapi.c
|
||||
${LIBRARY_DIR}/lib/vauth/krb5_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/ntlm.c
|
||||
${LIBRARY_DIR}/lib/vauth/ntlm_sspi.c
|
||||
${LIBRARY_DIR}/lib/vauth/oauth2.c
|
||||
${LIBRARY_DIR}/lib/vauth/spnego_gssapi.c
|
||||
${LIBRARY_DIR}/lib/vauth/spnego_sspi.c
|
||||
${LIBRARY_DIR}/lib/vtls/openssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/gtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/vtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/nss.c
|
||||
${LIBRARY_DIR}/lib/vtls/polarssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/polarssl_threadlock.c
|
||||
${LIBRARY_DIR}/lib/vtls/wolfssl.c
|
||||
${LIBRARY_DIR}/lib/vtls/schannel.c
|
||||
${LIBRARY_DIR}/lib/vtls/schannel_verify.c
|
||||
${LIBRARY_DIR}/lib/vtls/sectransp.c
|
||||
${LIBRARY_DIR}/lib/vtls/gskit.c
|
||||
${LIBRARY_DIR}/lib/vtls/mbedtls.c
|
||||
${LIBRARY_DIR}/lib/vtls/mesalink.c
|
||||
${LIBRARY_DIR}/lib/vtls/bearssl.c
|
||||
${LIBRARY_DIR}/lib/vquic/ngtcp2.c
|
||||
${LIBRARY_DIR}/lib/vquic/quiche.c
|
||||
${LIBRARY_DIR}/lib/vssh/libssh2.c
|
||||
${LIBRARY_DIR}/lib/vssh/libssh.c
|
||||
)
|
||||
add_library (curl ${SRCS})
|
||||
|
||||
add_library (curl ${SRCS})
|
||||
target_compile_definitions (curl PRIVATE
|
||||
HAVE_CONFIG_H
|
||||
BUILDING_LIBCURL
|
||||
CURL_HIDDEN_SYMBOLS
|
||||
libcurl_EXPORTS
|
||||
OS="${CMAKE_SYSTEM_NAME}"
|
||||
)
|
||||
target_include_directories (curl PUBLIC
|
||||
${LIBRARY_DIR}/include
|
||||
${LIBRARY_DIR}/lib
|
||||
. # curl_config.h
|
||||
)
|
||||
|
||||
target_compile_definitions (curl PRIVATE
|
||||
HAVE_CONFIG_H
|
||||
BUILDING_LIBCURL
|
||||
CURL_HIDDEN_SYMBOLS
|
||||
libcurl_EXPORTS
|
||||
OS="${CMAKE_SYSTEM_NAME}"
|
||||
)
|
||||
target_include_directories (curl PUBLIC
|
||||
${LIBRARY_DIR}/include
|
||||
${LIBRARY_DIR}/lib
|
||||
. # curl_config.h
|
||||
)
|
||||
target_link_libraries (curl PRIVATE ssl)
|
||||
|
||||
target_link_libraries (curl PRIVATE ssl)
|
||||
# The library is large - avoid bloat (XXX: is it?)
|
||||
target_compile_options (curl PRIVATE -g0)
|
||||
|
||||
# The library is large - avoid bloat (XXX: is it?)
|
||||
target_compile_options (curl PRIVATE -g0)
|
||||
|
||||
# find_package(CURL) compatibility for the following packages that uses
|
||||
# find_package(CURL)/include(FindCURL):
|
||||
# - mariadb-connector-c
|
||||
# - aws-s3-cmake
|
||||
# - sentry-native
|
||||
set (CURL_FOUND ON CACHE BOOL "")
|
||||
set (CURL_ROOT_DIR ${LIBRARY_DIR} CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIR ${LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIRS ${LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_LIBRARY curl CACHE STRING "")
|
||||
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
||||
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
||||
add_library (CURL::libcurl ALIAS ${CURL_LIBRARY})
|
||||
else ()
|
||||
find_package (CURL REQUIRED)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using curl: ${CURL_INCLUDE_DIRS} : ${CURL_LIBRARIES}")
|
||||
# find_package(CURL) compatibility for the following packages that uses
|
||||
# find_package(CURL)/include(FindCURL):
|
||||
# - mariadb-connector-c
|
||||
# - aws-s3-cmake
|
||||
# - sentry-native
|
||||
set (CURL_FOUND ON CACHE BOOL "")
|
||||
set (CURL_ROOT_DIR ${LIBRARY_DIR} CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIR ${LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_INCLUDE_DIRS ${LIBRARY_DIR}/include CACHE PATH "")
|
||||
set (CURL_LIBRARY curl CACHE STRING "")
|
||||
set (CURL_LIBRARIES ${CURL_LIBRARY} CACHE STRING "")
|
||||
set (CURL_VERSION_STRING 7.67.0 CACHE STRING "")
|
||||
add_library (CURL::libcurl ALIAS ${CURL_LIBRARY})
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 6054630889fd1cd8d0659573d69badcee1e23a00
|
|
@ -0,0 +1,69 @@
|
|||
set(CYRUS_SASL_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/cyrus-sasl)
|
||||
|
||||
add_library(${CYRUS_SASL_LIBRARY})
|
||||
|
||||
target_sources(${CYRUS_SASL_LIBRARY} PRIVATE
|
||||
${CYRUS_SASL_SOURCE_DIR}/plugins/gssapi.c
|
||||
# ${CYRUS_SASL_SOURCE_DIR}/plugins/gssapiv2_init.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/common/plugin_common.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/common.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/canonusr.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/server.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/config.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/auxprop.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/saslutil.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/external.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/seterror.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/md5.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/dlopen.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/client.c
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib/checkpw.c
|
||||
)
|
||||
|
||||
target_include_directories(${CYRUS_SASL_LIBRARY} PUBLIC
|
||||
${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(${CYRUS_SASL_LIBRARY} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR} # for config.h
|
||||
${CYRUS_SASL_SOURCE_DIR}/plugins
|
||||
${CYRUS_SASL_SOURCE_DIR}
|
||||
${CYRUS_SASL_SOURCE_DIR}/include
|
||||
${CYRUS_SASL_SOURCE_DIR}/lib
|
||||
${CYRUS_SASL_SOURCE_DIR}/sasldb
|
||||
${CYRUS_SASL_SOURCE_DIR}/common
|
||||
${CYRUS_SASL_SOURCE_DIR}/saslauthd
|
||||
${CYRUS_SASL_SOURCE_DIR}/sample
|
||||
${CYRUS_SASL_SOURCE_DIR}/utils
|
||||
${CYRUS_SASL_SOURCE_DIR}/tests
|
||||
)
|
||||
|
||||
target_compile_definitions(${CYRUS_SASL_LIBRARY} PUBLIC
|
||||
HAVE_CONFIG_H
|
||||
# PLUGINDIR="/usr/local/lib/sasl2"
|
||||
PLUGINDIR=""
|
||||
# PIC
|
||||
OBSOLETE_CRAM_ATTR=1
|
||||
# SASLAUTHD_CONF_FILE_DEFAULT="/usr/local/etc/saslauthd.conf"
|
||||
SASLAUTHD_CONF_FILE_DEFAULT=""
|
||||
# CONFIGDIR="/usr/local/lib/sasl2:/usr/local/etc/sasl2"
|
||||
CONFIGDIR=""
|
||||
OBSOLETE_DIGEST_ATTR=1
|
||||
LIBSASL_EXPORTS=1
|
||||
)
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/sasl)
|
||||
|
||||
file(COPY
|
||||
${CYRUS_SASL_SOURCE_DIR}/include/sasl.h
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/sasl
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${CYRUS_SASL_SOURCE_DIR}/include/prop.h
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}
|
||||
)
|
||||
|
||||
target_link_libraries(${CYRUS_SASL_LIBRARY}
|
||||
PUBLIC ${KRB5_LIBRARY}
|
||||
)
|
|
@ -0,0 +1,722 @@
|
|||
/* config.h. Generated from config.h.in by configure. */
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */
|
||||
|
||||
|
||||
/* acconfig.h - autoheader configuration input */
|
||||
/*
|
||||
* Copyright (c) 1998-2003 Carnegie Mellon University. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
*
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
*
|
||||
* 3. The name "Carnegie Mellon University" must not be used to
|
||||
* endorse or promote products derived from this software without
|
||||
* prior written permission. For permission or any other legal
|
||||
* details, please contact
|
||||
* Office of Technology Transfer
|
||||
* Carnegie Mellon University
|
||||
* 5000 Forbes Avenue
|
||||
* Pittsburgh, PA 15213-3890
|
||||
* (412) 268-4387, fax: (412) 268-7395
|
||||
* tech-transfer@andrew.cmu.edu
|
||||
*
|
||||
* 4. Redistributions of any form whatsoever must retain the following
|
||||
* acknowledgment:
|
||||
* "This product includes software developed by Computing Services
|
||||
* at Carnegie Mellon University (http://www.cmu.edu/computing/)."
|
||||
*
|
||||
* CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
|
||||
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
||||
* AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
|
||||
* FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
|
||||
* AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
|
||||
* OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef CONFIG_H
|
||||
#define CONFIG_H
|
||||
|
||||
|
||||
/* Include SASLdb Support */
|
||||
/* #undef AUTH_SASLDB */
|
||||
|
||||
/* Do we need a leading _ for dlsym? */
|
||||
/* #undef DLSYM_NEEDS_UNDERSCORE */
|
||||
|
||||
/* Should we build a shared plugin (via dlopen) library? */
|
||||
#define DO_DLOPEN /**/
|
||||
|
||||
/* should we support sasl_checkapop? */
|
||||
#define DO_SASL_CHECKAPOP /**/
|
||||
|
||||
/* should we support setpass() for SRP? */
|
||||
/* #undef DO_SRP_SETPASS */
|
||||
|
||||
/* Define if your getpwnam_r()/getspnam_r() functions take 5 arguments */
|
||||
#define GETXXNAM_R_5ARG 1
|
||||
|
||||
/* should we mutex-wrap calls into the GSS library? */
|
||||
#define GSS_USE_MUTEXES /**/
|
||||
|
||||
/* Enable 'alwaystrue' password verifier? */
|
||||
/* #undef HAVE_ALWAYSTRUE */
|
||||
|
||||
/* Define to 1 if you have the `asprintf' function. */
|
||||
#define HAVE_ASPRINTF 1
|
||||
|
||||
/* Include support for Courier's authdaemond? */
|
||||
#define HAVE_AUTHDAEMON /**/
|
||||
|
||||
/* Define to 1 if you have the <crypt.h> header file. */
|
||||
#define HAVE_CRYPT_H 1
|
||||
|
||||
/* Define to 1 if you have the <des.h> header file. */
|
||||
/* #undef HAVE_DES_H */
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `dns_lookup' function. */
|
||||
/* #undef HAVE_DNS_LOOKUP */
|
||||
|
||||
/* Define to 1 if you have the `dn_expand' function. */
|
||||
/* #undef HAVE_DN_EXPAND */
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Do we have a getaddrinfo? */
|
||||
#define HAVE_GETADDRINFO /**/
|
||||
|
||||
/* Define to 1 if you have the `getdomainname' function. */
|
||||
#define HAVE_GETDOMAINNAME 1
|
||||
|
||||
/* Define to 1 if you have the `gethostname' function. */
|
||||
#define HAVE_GETHOSTNAME 1
|
||||
|
||||
/* Do we have a getnameinfo() function? */
|
||||
#define HAVE_GETNAMEINFO /**/
|
||||
|
||||
/* Define to 1 if you have the `getpassphrase' function. */
|
||||
/* #undef HAVE_GETPASSPHRASE */
|
||||
|
||||
/* Define to 1 if you have the `getpwnam' function. */
|
||||
#define HAVE_GETPWNAM 1
|
||||
|
||||
/* Define to 1 if you have the `getspnam' function. */
|
||||
#define HAVE_GETSPNAM 1
|
||||
|
||||
/* do we have getsubopt()? */
|
||||
#define HAVE_GETSUBOPT /**/
|
||||
|
||||
/* Define to 1 if you have the `gettimeofday' function. */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Include GSSAPI/Kerberos 5 Support */
|
||||
#define HAVE_GSSAPI /**/
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_ext.h> header file. */
|
||||
#define HAVE_GSSAPI_GSSAPI_EXT_H 1
|
||||
|
||||
/* Define if you have the gssapi/gssapi.h header file */
|
||||
/* #undef HAVE_GSSAPI_GSSAPI_H */
|
||||
|
||||
/* Define to 1 if you have the <gssapi/gssapi_krb5.h> header file. */
|
||||
#define HAVE_GSSAPI_GSSAPI_KRB5_H 1
|
||||
|
||||
/* Define if you have the gssapi.h header file */
|
||||
#define HAVE_GSSAPI_H /**/
|
||||
|
||||
/* Define if your GSSAPI implementation defines
|
||||
gsskrb5_register_acceptor_identity */
|
||||
#define HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY 1
|
||||
|
||||
/* Define if your GSSAPI implementation defines GSS_C_NT_HOSTBASED_SERVICE */
|
||||
#define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/
|
||||
|
||||
/* Define if your GSSAPI implementation defines GSS_C_NT_USER_NAME */
|
||||
#define HAVE_GSS_C_NT_USER_NAME /**/
|
||||
|
||||
/* Define if your GSSAPI implementation defines GSS_C_SEC_CONTEXT_SASL_SSF */
|
||||
#define HAVE_GSS_C_SEC_CONTEXT_SASL_SSF /**/
|
||||
|
||||
/* Define to 1 if you have the `gss_decapsulate_token' function. */
|
||||
#define HAVE_GSS_DECAPSULATE_TOKEN 1
|
||||
|
||||
/* Define to 1 if you have the `gss_encapsulate_token' function. */
|
||||
#define HAVE_GSS_ENCAPSULATE_TOKEN 1
|
||||
|
||||
/* Define to 1 if you have the `gss_get_name_attribute' function. */
|
||||
#define HAVE_GSS_GET_NAME_ATTRIBUTE 1
|
||||
|
||||
/* Define if your GSSAPI implementation defines gss_inquire_sec_context_by_oid
|
||||
*/
|
||||
#define HAVE_GSS_INQUIRE_SEC_CONTEXT_BY_OID 1
|
||||
|
||||
/* Define to 1 if you have the `gss_oid_equal' function. */
|
||||
#define HAVE_GSS_OID_EQUAL 1
|
||||
|
||||
/* Define if your GSSAPI implementation supports SPNEGO */
|
||||
#define HAVE_GSS_SPNEGO /**/
|
||||
|
||||
/* Include HTTP form Support */
|
||||
/* #undef HAVE_HTTPFORM */
|
||||
|
||||
/* Define to 1 if you have the `inet_aton' function. */
|
||||
#define HAVE_INET_ATON 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the `jrand48' function. */
|
||||
#define HAVE_JRAND48 1
|
||||
|
||||
/* Do we have Kerberos 4 Support? */
|
||||
/* #undef HAVE_KRB */
|
||||
|
||||
/* Define to 1 if you have the <krb5.h> header file. */
|
||||
#define HAVE_KRB5_H 1
|
||||
|
||||
/* Define to 1 if you have the `krb_get_err_text' function. */
|
||||
/* #undef HAVE_KRB_GET_ERR_TEXT */
|
||||
|
||||
/* Define to 1 if you have the <lber.h> header file. */
|
||||
/* #undef HAVE_LBER_H */
|
||||
|
||||
/* Support for LDAP? */
|
||||
/* #undef HAVE_LDAP */
|
||||
|
||||
/* Define to 1 if you have the <ldap.h> header file. */
|
||||
/* #undef HAVE_LDAP_H */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#define HAVE_MALLOC_H 1
|
||||
|
||||
/* Define to 1 if you have the `memcpy' function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define to 1 if you have the `memmem' function. */
|
||||
#define HAVE_MEMMEM 1
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mkdir' function. */
|
||||
#define HAVE_MKDIR 1
|
||||
|
||||
/* Do we have mysql support? */
|
||||
/* #undef HAVE_MYSQL */
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Do we have OpenSSL? */
|
||||
#define HAVE_OPENSSL /**/
|
||||
|
||||
/* Use OPIE for server-side OTP? */
|
||||
/* #undef HAVE_OPIE */
|
||||
|
||||
/* Support for PAM? */
|
||||
/* #undef HAVE_PAM */
|
||||
|
||||
/* Define to 1 if you have the <paths.h> header file. */
|
||||
#define HAVE_PATHS_H 1
|
||||
|
||||
/* Do we have Postgres support? */
|
||||
/* #undef HAVE_PGSQL */
|
||||
|
||||
/* Include Support for pwcheck daemon? */
|
||||
/* #undef HAVE_PWCHECK */
|
||||
|
||||
/* Include support for saslauthd? */
|
||||
#define HAVE_SASLAUTHD /**/
|
||||
|
||||
/* Define to 1 if you have the `select' function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Do we have SHA512? */
|
||||
#define HAVE_SHA512 /**/
|
||||
|
||||
/* Include SIA Support */
|
||||
/* #undef HAVE_SIA */
|
||||
|
||||
/* Does the system have snprintf()? */
|
||||
#define HAVE_SNPRINTF /**/
|
||||
|
||||
/* Does sockaddr have an sa_len? */
|
||||
/* #undef HAVE_SOCKADDR_SA_LEN */
|
||||
|
||||
/* Define to 1 if you have the `socket' function. */
|
||||
#define HAVE_SOCKET 1
|
||||
|
||||
/* Do we have a socklen_t? */
|
||||
#define HAVE_SOCKLEN_T /**/
|
||||
|
||||
/* Do we have SQLite support? */
|
||||
/* #undef HAVE_SQLITE */
|
||||
|
||||
/* Do we have SQLite3 support? */
|
||||
/* #undef HAVE_SQLITE3 */
|
||||
|
||||
/* Is there an ss_family in sockaddr_storage? */
|
||||
#define HAVE_SS_FAMILY /**/
|
||||
|
||||
/* Define to 1 if you have the <stdarg.h> header file. */
|
||||
#define HAVE_STDARG_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcat' function. */
|
||||
/* #undef HAVE_STRLCAT */
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strspn' function. */
|
||||
#define HAVE_STRSPN 1
|
||||
|
||||
/* Define to 1 if you have the `strstr' function. */
|
||||
#define HAVE_STRSTR 1
|
||||
|
||||
/* Define to 1 if you have the `strtol' function. */
|
||||
#define HAVE_STRTOL 1
|
||||
|
||||
/* Do we have struct sockaddr_stroage? */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE /**/
|
||||
|
||||
/* Define to 1 if you have the <sysexits.h> header file. */
|
||||
#define HAVE_SYSEXITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `syslog' function. */
|
||||
#define HAVE_SYSLOG 1
|
||||
|
||||
/* Define to 1 if you have the <syslog.h> header file. */
|
||||
#define HAVE_SYSLOG_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define to 1 if you have <sys/wait.h> that is POSIX.1 compatible. */
|
||||
#define HAVE_SYS_WAIT_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the <varargs.h> header file. */
|
||||
/* #undef HAVE_VARARGS_H */
|
||||
|
||||
/* Does the system have vsnprintf()? */
|
||||
#define HAVE_VSNPRINTF /**/
|
||||
|
||||
/* Define to 1 if you have the <ws2tcpip.h> header file. */
|
||||
/* #undef HAVE_WS2TCPIP_H */
|
||||
|
||||
/* Should we keep handle to DB open in SASLDB plugin? */
|
||||
/* #undef KEEP_DB_OPEN */
|
||||
|
||||
/* Ignore IP Address in Kerberos 4 tickets? */
|
||||
/* #undef KRB4_IGNORE_IP_ADDRESS */
|
||||
|
||||
/* Using Heimdal */
|
||||
/* #undef KRB5_HEIMDAL */
|
||||
|
||||
/* Define to the sub-directory where libtool stores uninstalled libraries. */
|
||||
#define LT_OBJDIR ".libs/"
|
||||
|
||||
/* Name of package */
|
||||
#define PACKAGE "cyrus-sasl"
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "https://github.com/cyrusimap/cyrus-sasl/issues"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "cyrus-sasl"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "cyrus-sasl 2.1.27"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "cyrus-sasl"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL "http://www.cyrusimap.org"
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "2.1.27"
|
||||
|
||||
/* Where do we look for Courier authdaemond's socket? */
|
||||
#define PATH_AUTHDAEMON_SOCKET "/dev/null"
|
||||
|
||||
/* Where do we look for saslauthd's socket? */
|
||||
#define PATH_SASLAUTHD_RUNDIR "/var/state/saslauthd"
|
||||
|
||||
/* Force a preferred mechanism */
|
||||
/* #undef PREFER_MECH */
|
||||
|
||||
/* Location of pwcheck socket */
|
||||
/* #undef PWCHECKDIR */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Use BerkeleyDB for SASLdb */
|
||||
/* #undef SASL_BERKELEYDB */
|
||||
|
||||
/* Path to default SASLdb database */
|
||||
#define SASL_DB_PATH "/etc/sasldb2"
|
||||
|
||||
/* File to use for source of randomness */
|
||||
#define SASL_DEV_RANDOM "/dev/urandom"
|
||||
|
||||
/* Use GDBM for SASLdb */
|
||||
/* #undef SASL_GDBM */
|
||||
|
||||
/* Use LMDB for SASLdb */
|
||||
/* #undef SASL_LMDB */
|
||||
|
||||
/* Use NDBM for SASLdb */
|
||||
/* #undef SASL_NDBM */
|
||||
|
||||
/* The size of `long', as computed by sizeof. */
|
||||
#define SIZEOF_LONG 8
|
||||
|
||||
/* Link ANONYMOUS Statically */
|
||||
// #define STATIC_ANONYMOUS /**/
|
||||
|
||||
/* Link CRAM-MD5 Statically */
|
||||
// #define STATIC_CRAMMD5 /**/
|
||||
|
||||
/* Link DIGEST-MD5 Statically */
|
||||
// #define STATIC_DIGESTMD5 /**/
|
||||
|
||||
/* Link GSSAPI Statically */
|
||||
#define STATIC_GSSAPIV2 /**/
|
||||
|
||||
/* User KERBEROS_V4 Staticly */
|
||||
/* #undef STATIC_KERBEROS4 */
|
||||
|
||||
/* Link ldapdb plugin Statically */
|
||||
/* #undef STATIC_LDAPDB */
|
||||
|
||||
/* Link LOGIN Statically */
|
||||
/* #undef STATIC_LOGIN */
|
||||
|
||||
/* Link NTLM Statically */
|
||||
/* #undef STATIC_NTLM */
|
||||
|
||||
/* Link OTP Statically */
|
||||
// #define STATIC_OTP /**/
|
||||
|
||||
/* Link PASSDSS Statically */
|
||||
/* #undef STATIC_PASSDSS */
|
||||
|
||||
/* Link PLAIN Staticly */
|
||||
// #define STATIC_PLAIN /**/
|
||||
|
||||
/* Link SASLdb Staticly */
|
||||
// #define STATIC_SASLDB /**/
|
||||
|
||||
/* Link SCRAM Statically */
|
||||
// #define STATIC_SCRAM /**/
|
||||
|
||||
/* Link SQL plugin statically */
|
||||
/* #undef STATIC_SQL */
|
||||
|
||||
/* Link SRP Statically */
|
||||
/* #undef STATIC_SRP */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Should we try to dlopen() plugins while statically compiled? */
|
||||
/* #undef TRY_DLOPEN_WHEN_STATIC */
|
||||
|
||||
/* use the doors IPC API for saslauthd? */
|
||||
/* #undef USE_DOORS */
|
||||
|
||||
/* Enable extensions on AIX 3, Interix. */
|
||||
#ifndef _ALL_SOURCE
|
||||
# define _ALL_SOURCE 1
|
||||
#endif
|
||||
/* Enable GNU extensions on systems that have them. */
|
||||
#ifndef _GNU_SOURCE
|
||||
# define _GNU_SOURCE 1
|
||||
#endif
|
||||
/* Enable threading extensions on Solaris. */
|
||||
#ifndef _POSIX_PTHREAD_SEMANTICS
|
||||
# define _POSIX_PTHREAD_SEMANTICS 1
|
||||
#endif
|
||||
/* Enable extensions on HP NonStop. */
|
||||
#ifndef _TANDEM_SOURCE
|
||||
# define _TANDEM_SOURCE 1
|
||||
#endif
|
||||
/* Enable general extensions on Solaris. */
|
||||
#ifndef __EXTENSIONS__
|
||||
# define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
|
||||
/* Version number of package */
|
||||
#define VERSION "2.1.27"
|
||||
|
||||
/* Use DES */
|
||||
#define WITH_DES /**/
|
||||
|
||||
/* Linking against dmalloc? */
|
||||
/* #undef WITH_DMALLOC */
|
||||
|
||||
/* Use RC4 */
|
||||
#define WITH_RC4 /**/
|
||||
|
||||
/* Use OpenSSL DES Implementation */
|
||||
#define WITH_SSL_DES /**/
|
||||
|
||||
/* Define to 1 if on MINIX. */
|
||||
/* #undef _MINIX */
|
||||
|
||||
/* Define to 2 if the system does not provide POSIX.1 features except with
|
||||
this defined. */
|
||||
/* #undef _POSIX_1_SOURCE */
|
||||
|
||||
/* Define to 1 if you need to in order for `stat' and other things to work. */
|
||||
/* #undef _POSIX_SOURCE */
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
|
||||
|
||||
|
||||
/* Create a struct iovec if we need one */
|
||||
#if !defined(_WIN32)
|
||||
#if !defined(HAVE_SYS_UIO_H)
|
||||
/* (win32 is handled in sasl.h) */
|
||||
struct iovec {
|
||||
char *iov_base;
|
||||
long iov_len;
|
||||
};
|
||||
#else
|
||||
#include <sys/types.h>
|
||||
#include <sys/uio.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* location of the random number generator */
|
||||
#ifdef DEV_RANDOM
|
||||
/* #undef DEV_RANDOM */
|
||||
#endif
|
||||
#define DEV_RANDOM SASL_DEV_RANDOM
|
||||
|
||||
/* if we've got krb_get_err_txt, we might as well use it;
|
||||
especially since krb_err_txt isn't in some newer distributions
|
||||
(MIT Kerb for Mac 4 being a notable example). If we don't have
|
||||
it, we fall back to the krb_err_txt array */
|
||||
#ifdef HAVE_KRB_GET_ERR_TEXT
|
||||
#define get_krb_err_txt krb_get_err_text
|
||||
#else
|
||||
#define get_krb_err_txt(X) (krb_err_txt[(X)])
|
||||
#endif
|
||||
|
||||
/* Make Solaris happy... */
|
||||
#ifndef __EXTENSIONS__
|
||||
#define __EXTENSIONS__ 1
|
||||
#endif
|
||||
|
||||
/* Make Linux happy... */
|
||||
#ifndef _GNU_SOURCE
|
||||
#define _GNU_SOURCE 1
|
||||
#endif
|
||||
|
||||
#define SASL_PATH_ENV_VAR "SASL_PATH"
|
||||
#define SASL_CONF_PATH_ENV_VAR "SASL_CONF_PATH"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
#ifndef WIN32
|
||||
# include <sys/socket.h>
|
||||
# include <netdb.h>
|
||||
# include <netinet/in.h>
|
||||
# ifdef HAVE_SYS_PARAM_H
|
||||
# include <sys/param.h>
|
||||
# endif
|
||||
#else /* WIN32 */
|
||||
# include <winsock2.h>
|
||||
#endif /* WIN32 */
|
||||
#include <string.h>
|
||||
|
||||
#ifndef HAVE_SOCKLEN_T
|
||||
typedef unsigned int socklen_t;
|
||||
#endif /* HAVE_SOCKLEN_T */
|
||||
|
||||
#if !defined(HAVE_STRUCT_SOCKADDR_STORAGE) && !defined(WIN32)
|
||||
#define _SS_MAXSIZE 128 /* Implementation specific max size */
|
||||
#define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr))
|
||||
|
||||
struct sockaddr_storage {
|
||||
struct sockaddr ss_sa;
|
||||
char __ss_pad2[_SS_PADSIZE];
|
||||
};
|
||||
# define ss_family ss_sa.sa_family
|
||||
#endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */
|
||||
|
||||
#ifndef AF_INET6
|
||||
/* Define it to something that should never appear */
|
||||
#define AF_INET6 AF_MAX
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETADDRINFO
|
||||
#define getaddrinfo sasl_getaddrinfo
|
||||
#define freeaddrinfo sasl_freeaddrinfo
|
||||
#define gai_strerror sasl_gai_strerror
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_GETNAMEINFO
|
||||
#define getnameinfo sasl_getnameinfo
|
||||
#endif
|
||||
|
||||
#if !defined(HAVE_GETNAMEINFO) || !defined(HAVE_GETADDRINFO)
|
||||
#include "gai.h"
|
||||
#endif
|
||||
|
||||
#ifndef AI_NUMERICHOST /* support glibc 2.0.x */
|
||||
#define AI_NUMERICHOST 4
|
||||
#define NI_NUMERICHOST 2
|
||||
#define NI_NAMEREQD 4
|
||||
#define NI_NUMERICSERV 8
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_SYSEXITS_H
|
||||
#include "exits.h"
|
||||
#else
|
||||
#include "sysexits.h"
|
||||
#endif
|
||||
|
||||
/* Get the correct time.h */
|
||||
#if TIME_WITH_SYS_TIME
|
||||
# include <sys/time.h>
|
||||
# include <time.h>
|
||||
#else
|
||||
# if HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# else
|
||||
# include <time.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef HIER_DELIMITER
|
||||
#define HIER_DELIMITER '/'
|
||||
#endif
|
||||
|
||||
#ifdef WIN32
|
||||
#define SASL_ROOT_KEY "SOFTWARE\\Carnegie Mellon\\Project Cyrus\\SASL Library"
|
||||
#define SASL_PLUGIN_PATH_ATTR "SearchPath"
|
||||
#define SASL_CONF_PATH_ATTR "ConfFile"
|
||||
|
||||
#include <windows.h>
|
||||
inline static unsigned int sleep(unsigned int seconds) {
|
||||
Sleep(seconds * 1000);
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* handy string manipulation functions */
|
||||
#ifndef HAVE_STRLCPY
|
||||
extern size_t saslauthd_strlcpy(char *dst, const char *src, size_t len);
|
||||
#define strlcpy(x,y,z) saslauthd_strlcpy((x),(y),(z))
|
||||
#endif
|
||||
#ifndef HAVE_STRLCAT
|
||||
extern size_t saslauthd_strlcat(char *dst, const char *src, size_t len);
|
||||
#define strlcat(x,y,z) saslauthd_strlcat((x),(y),(z))
|
||||
#endif
|
||||
#ifndef HAVE_ASPRINTF
|
||||
extern int asprintf(char **str, const char *fmt, ...);
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_H */
|
||||
|
||||
|
||||
#if defined __GNUC__ && __GNUC__ > 6
|
||||
#define GCC_FALLTHROUGH __attribute__((fallthrough));
|
||||
#else
|
||||
#define GCC_FALLTHROUGH /* fall through */
|
||||
#endif
|
|
@ -1,252 +1,272 @@
|
|||
option (ENABLE_HYPERSCAN "Enable hyperscan library" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (NOT HAVE_SSSE3)
|
||||
if (HAVE_SSSE3)
|
||||
option (ENABLE_HYPERSCAN "Enable hyperscan library" ${ENABLE_LIBRARIES})
|
||||
elseif(ENABLE_HYPERSCAN)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use hyperscan without SSSE3")
|
||||
set (ENABLE_HYPERSCAN OFF)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_HYPERSCAN)
|
||||
option (USE_INTERNAL_HYPERSCAN_LIBRARY "Use internal hyperscan library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT ENABLE_HYPERSCAN)
|
||||
if (USE_INTERNAL_HYPERSCAN_LIBRARY)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/hyperscan)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal hyperscan with ENABLE_HYPERSCAN=OFF")
|
||||
endif()
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/src/alloc.c
|
||||
${LIBRARY_DIR}/src/compiler/asserts.cpp
|
||||
${LIBRARY_DIR}/src/compiler/compiler.cpp
|
||||
${LIBRARY_DIR}/src/compiler/error.cpp
|
||||
${LIBRARY_DIR}/src/crc32.c
|
||||
${LIBRARY_DIR}/src/database.c
|
||||
${LIBRARY_DIR}/src/fdr/engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_compile_util.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_confirm_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr.c
|
||||
${LIBRARY_DIR}/src/fdr/flood_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy_engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy.c
|
||||
${LIBRARY_DIR}/src/grey.cpp
|
||||
${LIBRARY_DIR}/src/hs_valid_platform.c
|
||||
${LIBRARY_DIR}/src/hs_version.c
|
||||
${LIBRARY_DIR}/src/hs.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm_build.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm_literal.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm.c
|
||||
${LIBRARY_DIR}/src/hwlm/noodle_build.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/noodle_engine.c
|
||||
${LIBRARY_DIR}/src/nfa/accel_dfa_build_strat.cpp
|
||||
${LIBRARY_DIR}/src/nfa/accel.c
|
||||
${LIBRARY_DIR}/src/nfa/accelcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/castle.c
|
||||
${LIBRARY_DIR}/src/nfa/castlecompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/dfa_build_strat.cpp
|
||||
${LIBRARY_DIR}/src/nfa/dfa_min.cpp
|
||||
${LIBRARY_DIR}/src/nfa/gough.c
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile_accel.cpp
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile_reg.cpp
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/lbr.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_64.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_accel.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_compile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/limex_native.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd128.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd256.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd384.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd512.c
|
||||
${LIBRARY_DIR}/src/nfa/mcclellan.c
|
||||
${LIBRARY_DIR}/src/nfa/mcclellancompile_util.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcclellancompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng_compile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng_data.c
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng.c
|
||||
${LIBRARY_DIR}/src/nfa/mpv.c
|
||||
${LIBRARY_DIR}/src/nfa/mpvcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/nfa_api_dispatch.c
|
||||
${LIBRARY_DIR}/src/nfa/nfa_build_util.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa_graph.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa_merge.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa.cpp
|
||||
${LIBRARY_DIR}/src/nfa/repeat.c
|
||||
${LIBRARY_DIR}/src/nfa/repeatcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/sheng.c
|
||||
${LIBRARY_DIR}/src/nfa/shengcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/shufti.c
|
||||
${LIBRARY_DIR}/src/nfa/shufticompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/tamarama.c
|
||||
${LIBRARY_DIR}/src/nfa/tamaramacompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/truffle.c
|
||||
${LIBRARY_DIR}/src/nfa/trufflecompile.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_anchored_acyclic.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_anchored_dots.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_asserts.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_builder.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_calc_components.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_cyclic_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_depth.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_dominators.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_edge_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_equivalence.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_execute.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_expr_info.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_extparam.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_fixed_width.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_fuzzy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_haig.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_holder.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_is_equal.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_lbr.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_limex_accel.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_limex.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_analysis.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_component.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_decorated.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_mcclellan.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_misc_opt.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_netflow.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_prefilter.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_prune.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_puff.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_region_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_region.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_repeat.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_reports.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_restructuring.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_revacc.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_sep.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_small_literal_set.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som_add_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som_util.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_split.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_squash.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_stop.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_uncalc_components.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_utf8.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_util.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_vacuous.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_violet.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_width.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng.cpp
|
||||
${LIBRARY_DIR}/src/parser/AsciiComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/parser/buildstate.cpp
|
||||
${LIBRARY_DIR}/src/parser/check_refs.cpp
|
||||
${LIBRARY_DIR}/src/parser/Component.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAlternation.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAssertion.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAtomicGroup.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentBackReference.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentBoundary.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentByte.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentCondReference.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentEmpty.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentEUS.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentRepeat.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentSequence.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentVisitor.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentWordBoundary.cpp
|
||||
${LIBRARY_DIR}/src/parser/ConstComponentVisitor.cpp
|
||||
${LIBRARY_DIR}/src/parser/control_verbs.cpp
|
||||
${LIBRARY_DIR}/src/parser/logical_combination.cpp
|
||||
${LIBRARY_DIR}/src/parser/parse_error.cpp
|
||||
${LIBRARY_DIR}/src/parser/parser_util.cpp
|
||||
${LIBRARY_DIR}/src/parser/Parser.cpp
|
||||
${LIBRARY_DIR}/src/parser/prefilter.cpp
|
||||
${LIBRARY_DIR}/src/parser/shortcut_literal.cpp
|
||||
${LIBRARY_DIR}/src/parser/ucp_table.cpp
|
||||
${LIBRARY_DIR}/src/parser/unsupported.cpp
|
||||
${LIBRARY_DIR}/src/parser/utf8_validate.cpp
|
||||
${LIBRARY_DIR}/src/parser/Utf8ComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/rose/block.c
|
||||
${LIBRARY_DIR}/src/rose/catchup.c
|
||||
${LIBRARY_DIR}/src/rose/init.c
|
||||
${LIBRARY_DIR}/src/rose/match.c
|
||||
${LIBRARY_DIR}/src/rose/program_runtime.c
|
||||
${LIBRARY_DIR}/src/rose/rose_build_add_mask.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_add.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_anchored.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_bytecode.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_castle.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_compile.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_convert.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_dedupe.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_engine_blob.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_exclusive.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_groups.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_infix.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_instructions.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_lit_accel.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_long_lit.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_lookaround.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_matchers.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_merge.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_misc.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_program.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_role_aliasing.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_scatter.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_width.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_in_util.cpp
|
||||
${LIBRARY_DIR}/src/rose/stream.c
|
||||
${LIBRARY_DIR}/src/runtime.c
|
||||
${LIBRARY_DIR}/src/scratch.c
|
||||
${LIBRARY_DIR}/src/smallwrite/smallwrite_build.cpp
|
||||
${LIBRARY_DIR}/src/som/slot_manager.cpp
|
||||
${LIBRARY_DIR}/src/som/som_runtime.c
|
||||
${LIBRARY_DIR}/src/som/som_stream.c
|
||||
${LIBRARY_DIR}/src/stream_compress.c
|
||||
${LIBRARY_DIR}/src/util/alloc.cpp
|
||||
${LIBRARY_DIR}/src/util/charreach.cpp
|
||||
${LIBRARY_DIR}/src/util/clique.cpp
|
||||
${LIBRARY_DIR}/src/util/compile_context.cpp
|
||||
${LIBRARY_DIR}/src/util/compile_error.cpp
|
||||
${LIBRARY_DIR}/src/util/cpuid_flags.c
|
||||
${LIBRARY_DIR}/src/util/depth.cpp
|
||||
${LIBRARY_DIR}/src/util/fatbit_build.cpp
|
||||
${LIBRARY_DIR}/src/util/multibit_build.cpp
|
||||
${LIBRARY_DIR}/src/util/multibit.c
|
||||
${LIBRARY_DIR}/src/util/report_manager.cpp
|
||||
${LIBRARY_DIR}/src/util/simd_utils.c
|
||||
${LIBRARY_DIR}/src/util/state_compress.c
|
||||
${LIBRARY_DIR}/src/util/target_info.cpp
|
||||
${LIBRARY_DIR}/src/util/ue2string.cpp
|
||||
)
|
||||
add_library (hyperscan INTERFACE)
|
||||
target_compile_definitions (hyperscan INTERFACE USE_HYPERSCAN=0)
|
||||
|
||||
add_library (hyperscan ${SRCS})
|
||||
message (STATUS "Not using hyperscan")
|
||||
return()
|
||||
endif()
|
||||
|
||||
target_compile_definitions (hyperscan PUBLIC USE_HYPERSCAN=1)
|
||||
target_compile_options (hyperscan
|
||||
PRIVATE -g0 # Library has too much debug information
|
||||
-march=corei7 -O2 -fno-strict-aliasing -fno-omit-frame-pointer -fvisibility=hidden # The options from original build system
|
||||
-fno-sanitize=undefined # Assume the library takes care of itself
|
||||
)
|
||||
target_include_directories (hyperscan
|
||||
PRIVATE
|
||||
common
|
||||
${LIBRARY_DIR}/include
|
||||
)
|
||||
target_include_directories (hyperscan SYSTEM PUBLIC ${LIBRARY_DIR}/src)
|
||||
if (ARCH_AMD64)
|
||||
target_include_directories (hyperscan PRIVATE x86_64)
|
||||
endif ()
|
||||
target_link_libraries (hyperscan PRIVATE boost::headers_only)
|
||||
else ()
|
||||
find_library (LIBRARY_HYPERSCAN hs)
|
||||
find_path (INCLUDE_HYPERSCAN NAMES hs.h HINTS /usr/include/hs) # Ubuntu puts headers in this folder
|
||||
option (USE_INTERNAL_HYPERSCAN_LIBRARY "Use internal hyperscan library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (NOT USE_INTERNAL_HYPERSCAN_LIBRARY)
|
||||
find_library (LIBRARY_HYPERSCAN hs)
|
||||
find_path (INCLUDE_HYPERSCAN NAMES hs.h HINTS /usr/include/hs) # Ubuntu puts headers in this folder
|
||||
|
||||
if (LIBRARY_HYPERSCAN AND INCLUDE_HYPERSCAN)
|
||||
set (EXTERNAL_HYPERSCAN_LIBRARY_FOUND 1)
|
||||
|
||||
add_library (hyperscan UNKNOWN IMPORTED GLOBAL)
|
||||
set_target_properties (hyperscan PROPERTIES IMPORTED_LOCATION ${LIBRARY_HYPERSCAN})
|
||||
set_target_properties (hyperscan PROPERTIES INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_HYPERSCAN})
|
||||
set_property(TARGET hyperscan APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USE_HYPERSCAN=1)
|
||||
else ()
|
||||
set (EXTERNAL_HYPERSCAN_LIBRARY_FOUND 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system hyperscan library")
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using hyperscan")
|
||||
else ()
|
||||
add_library (hyperscan INTERFACE)
|
||||
target_compile_definitions (hyperscan INTERFACE USE_HYPERSCAN=0)
|
||||
|
||||
message (STATUS "Not using hyperscan")
|
||||
endif ()
|
||||
|
||||
if (NOT EXTERNAL_HYPERSCAN_LIBRARY_FOUND)
|
||||
set (USE_INTERNAL_HYPERSCAN_LIBRARY 1)
|
||||
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/hyperscan)
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/src/alloc.c
|
||||
${LIBRARY_DIR}/src/compiler/asserts.cpp
|
||||
${LIBRARY_DIR}/src/compiler/compiler.cpp
|
||||
${LIBRARY_DIR}/src/compiler/error.cpp
|
||||
${LIBRARY_DIR}/src/crc32.c
|
||||
${LIBRARY_DIR}/src/database.c
|
||||
${LIBRARY_DIR}/src/fdr/engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_compile_util.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_confirm_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr_engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/fdr.c
|
||||
${LIBRARY_DIR}/src/fdr/flood_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy_compile.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy_engine_description.cpp
|
||||
${LIBRARY_DIR}/src/fdr/teddy.c
|
||||
${LIBRARY_DIR}/src/grey.cpp
|
||||
${LIBRARY_DIR}/src/hs_valid_platform.c
|
||||
${LIBRARY_DIR}/src/hs_version.c
|
||||
${LIBRARY_DIR}/src/hs.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm_build.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm_literal.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/hwlm.c
|
||||
${LIBRARY_DIR}/src/hwlm/noodle_build.cpp
|
||||
${LIBRARY_DIR}/src/hwlm/noodle_engine.c
|
||||
${LIBRARY_DIR}/src/nfa/accel_dfa_build_strat.cpp
|
||||
${LIBRARY_DIR}/src/nfa/accel.c
|
||||
${LIBRARY_DIR}/src/nfa/accelcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/castle.c
|
||||
${LIBRARY_DIR}/src/nfa/castlecompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/dfa_build_strat.cpp
|
||||
${LIBRARY_DIR}/src/nfa/dfa_min.cpp
|
||||
${LIBRARY_DIR}/src/nfa/gough.c
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile_accel.cpp
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile_reg.cpp
|
||||
${LIBRARY_DIR}/src/nfa/goughcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/lbr.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_64.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_accel.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_compile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/limex_native.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd128.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd256.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd384.c
|
||||
${LIBRARY_DIR}/src/nfa/limex_simd512.c
|
||||
${LIBRARY_DIR}/src/nfa/mcclellan.c
|
||||
${LIBRARY_DIR}/src/nfa/mcclellancompile_util.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcclellancompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng_compile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng_data.c
|
||||
${LIBRARY_DIR}/src/nfa/mcsheng.c
|
||||
${LIBRARY_DIR}/src/nfa/mpv.c
|
||||
${LIBRARY_DIR}/src/nfa/mpvcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/nfa_api_dispatch.c
|
||||
${LIBRARY_DIR}/src/nfa/nfa_build_util.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa_graph.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa_merge.cpp
|
||||
${LIBRARY_DIR}/src/nfa/rdfa.cpp
|
||||
${LIBRARY_DIR}/src/nfa/repeat.c
|
||||
${LIBRARY_DIR}/src/nfa/repeatcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/sheng.c
|
||||
${LIBRARY_DIR}/src/nfa/shengcompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/shufti.c
|
||||
${LIBRARY_DIR}/src/nfa/shufticompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/tamarama.c
|
||||
${LIBRARY_DIR}/src/nfa/tamaramacompile.cpp
|
||||
${LIBRARY_DIR}/src/nfa/truffle.c
|
||||
${LIBRARY_DIR}/src/nfa/trufflecompile.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_anchored_acyclic.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_anchored_dots.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_asserts.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_builder.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_calc_components.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_cyclic_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_depth.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_dominators.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_edge_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_equivalence.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_execute.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_expr_info.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_extparam.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_fixed_width.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_fuzzy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_haig.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_holder.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_is_equal.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_lbr.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_limex_accel.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_limex.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_analysis.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_component.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_literal_decorated.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_mcclellan.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_misc_opt.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_netflow.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_prefilter.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_prune.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_puff.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_region_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_region.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_repeat.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_reports.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_restructuring.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_revacc.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_sep.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_small_literal_set.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som_add_redundancy.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som_util.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_som.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_split.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_squash.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_stop.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_uncalc_components.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_utf8.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_util.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_vacuous.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_violet.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng_width.cpp
|
||||
${LIBRARY_DIR}/src/nfagraph/ng.cpp
|
||||
${LIBRARY_DIR}/src/parser/AsciiComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/parser/buildstate.cpp
|
||||
${LIBRARY_DIR}/src/parser/check_refs.cpp
|
||||
${LIBRARY_DIR}/src/parser/Component.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAlternation.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAssertion.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentAtomicGroup.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentBackReference.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentBoundary.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentByte.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentCondReference.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentEmpty.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentEUS.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentRepeat.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentSequence.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentVisitor.cpp
|
||||
${LIBRARY_DIR}/src/parser/ComponentWordBoundary.cpp
|
||||
${LIBRARY_DIR}/src/parser/ConstComponentVisitor.cpp
|
||||
${LIBRARY_DIR}/src/parser/control_verbs.cpp
|
||||
${LIBRARY_DIR}/src/parser/logical_combination.cpp
|
||||
${LIBRARY_DIR}/src/parser/parse_error.cpp
|
||||
${LIBRARY_DIR}/src/parser/parser_util.cpp
|
||||
${LIBRARY_DIR}/src/parser/Parser.cpp
|
||||
${LIBRARY_DIR}/src/parser/prefilter.cpp
|
||||
${LIBRARY_DIR}/src/parser/shortcut_literal.cpp
|
||||
${LIBRARY_DIR}/src/parser/ucp_table.cpp
|
||||
${LIBRARY_DIR}/src/parser/unsupported.cpp
|
||||
${LIBRARY_DIR}/src/parser/utf8_validate.cpp
|
||||
${LIBRARY_DIR}/src/parser/Utf8ComponentClass.cpp
|
||||
${LIBRARY_DIR}/src/rose/block.c
|
||||
${LIBRARY_DIR}/src/rose/catchup.c
|
||||
${LIBRARY_DIR}/src/rose/init.c
|
||||
${LIBRARY_DIR}/src/rose/match.c
|
||||
${LIBRARY_DIR}/src/rose/program_runtime.c
|
||||
${LIBRARY_DIR}/src/rose/rose_build_add_mask.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_add.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_anchored.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_bytecode.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_castle.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_compile.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_convert.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_dedupe.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_engine_blob.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_exclusive.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_groups.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_infix.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_instructions.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_lit_accel.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_long_lit.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_lookaround.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_matchers.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_merge.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_misc.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_program.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_role_aliasing.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_scatter.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_build_width.cpp
|
||||
${LIBRARY_DIR}/src/rose/rose_in_util.cpp
|
||||
${LIBRARY_DIR}/src/rose/stream.c
|
||||
${LIBRARY_DIR}/src/runtime.c
|
||||
${LIBRARY_DIR}/src/scratch.c
|
||||
${LIBRARY_DIR}/src/smallwrite/smallwrite_build.cpp
|
||||
${LIBRARY_DIR}/src/som/slot_manager.cpp
|
||||
${LIBRARY_DIR}/src/som/som_runtime.c
|
||||
${LIBRARY_DIR}/src/som/som_stream.c
|
||||
${LIBRARY_DIR}/src/stream_compress.c
|
||||
${LIBRARY_DIR}/src/util/alloc.cpp
|
||||
${LIBRARY_DIR}/src/util/charreach.cpp
|
||||
${LIBRARY_DIR}/src/util/clique.cpp
|
||||
${LIBRARY_DIR}/src/util/compile_context.cpp
|
||||
${LIBRARY_DIR}/src/util/compile_error.cpp
|
||||
${LIBRARY_DIR}/src/util/cpuid_flags.c
|
||||
${LIBRARY_DIR}/src/util/depth.cpp
|
||||
${LIBRARY_DIR}/src/util/fatbit_build.cpp
|
||||
${LIBRARY_DIR}/src/util/multibit_build.cpp
|
||||
${LIBRARY_DIR}/src/util/multibit.c
|
||||
${LIBRARY_DIR}/src/util/report_manager.cpp
|
||||
${LIBRARY_DIR}/src/util/simd_utils.c
|
||||
${LIBRARY_DIR}/src/util/state_compress.c
|
||||
${LIBRARY_DIR}/src/util/target_info.cpp
|
||||
${LIBRARY_DIR}/src/util/ue2string.cpp
|
||||
)
|
||||
|
||||
add_library (hyperscan ${SRCS})
|
||||
|
||||
target_compile_definitions (hyperscan PUBLIC USE_HYPERSCAN=1)
|
||||
target_compile_options (hyperscan
|
||||
PRIVATE -g0 # Library has too much debug information
|
||||
-march=corei7 -O2 -fno-strict-aliasing -fno-omit-frame-pointer -fvisibility=hidden # The options from original build system
|
||||
-fno-sanitize=undefined # Assume the library takes care of itself
|
||||
)
|
||||
target_include_directories (hyperscan
|
||||
PRIVATE
|
||||
common
|
||||
${LIBRARY_DIR}/include
|
||||
)
|
||||
target_include_directories (hyperscan SYSTEM PUBLIC ${LIBRARY_DIR}/src)
|
||||
if (ARCH_AMD64)
|
||||
target_include_directories (hyperscan PRIVATE x86_64)
|
||||
endif ()
|
||||
target_link_libraries (hyperscan PRIVATE boost::headers_only)
|
||||
|
||||
set (USE_INTERNAL_HYPERSCAN_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using hyperscan")
|
||||
|
|
|
@ -1,141 +1,43 @@
|
|||
option (ENABLE_JEMALLOC "Enable jemalloc allocator" ${ENABLE_LIBRARIES})
|
||||
|
||||
if (SANITIZE OR NOT (ARCH_AMD64 OR ARCH_ARM) OR NOT (OS_LINUX OR OS_FREEBSD OR OS_DARWIN))
|
||||
if (ENABLE_JEMALLOC)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL}
|
||||
"jemalloc is disabled implicitly: it doesn't work with sanitizers and can only be used with x86_64 or aarch64 on linux or freebsd.")
|
||||
endif()
|
||||
set (ENABLE_JEMALLOC OFF)
|
||||
message (STATUS "jemalloc is disabled implicitly: it doesn't work with sanitizers and can only be used with x86_64 or aarch64 on linux or freebsd.")
|
||||
else()
|
||||
option (ENABLE_JEMALLOC "Enable jemalloc allocator" ${ENABLE_LIBRARIES})
|
||||
endif ()
|
||||
|
||||
if (ENABLE_JEMALLOC)
|
||||
if (NOT OS_LINUX)
|
||||
message (WARNING "jemalloc support on non-linux is EXPERIMENTAL")
|
||||
if (NOT ENABLE_JEMALLOC)
|
||||
if(USE_INTERNAL_JEMALLOC_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't use internal jemalloc with ENABLE_JEMALLOC=OFF")
|
||||
endif()
|
||||
|
||||
option (USE_INTERNAL_JEMALLOC "Use internal jemalloc library" ${NOT_UNBUNDLED})
|
||||
add_library(jemalloc INTERFACE)
|
||||
target_compile_definitions(jemalloc INTERFACE USE_JEMALLOC=0)
|
||||
|
||||
if (USE_INTERNAL_JEMALLOC)
|
||||
if (OS_LINUX)
|
||||
# ThreadPool select job randomly, and there can be some threads that had been
|
||||
# performed some memory heavy task before and will be inactive for some time,
|
||||
# but until it will became active again, the memory will not be freed since by
|
||||
# default each thread has it's own arena, but there should be not more then
|
||||
# 4*CPU arenas (see opt.nareans description).
|
||||
#
|
||||
# By enabling percpu_arena number of arenas limited to number of CPUs and hence
|
||||
# this problem should go away.
|
||||
#
|
||||
# muzzy_decay_ms -- use MADV_FREE when available on newer Linuxes, to
|
||||
# avoid spurious latencies and additional work associated with
|
||||
# MADV_DONTNEED. See
|
||||
# https://github.com/ClickHouse/ClickHouse/issues/11121 for motivation.
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "percpu_arena:percpu,oversize_threshold:0,muzzy_decay_ms:10000")
|
||||
else()
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "oversize_threshold:0,muzzy_decay_ms:10000")
|
||||
endif()
|
||||
# CACHE variable is empty, to allow changing defaults without necessity
|
||||
# to purge cache
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE "" CACHE STRING "Change default configuration string of JEMalloc" )
|
||||
if (JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE)
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "${JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE}")
|
||||
endif()
|
||||
message (STATUS "jemalloc malloc_conf: ${JEMALLOC_CONFIG_MALLOC_CONF}")
|
||||
message (STATUS "Not using jemalloc")
|
||||
return()
|
||||
endif ()
|
||||
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/jemalloc")
|
||||
if (NOT OS_LINUX)
|
||||
message (WARNING "jemalloc support on non-linux is EXPERIMENTAL")
|
||||
endif()
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/src/arena.c
|
||||
${LIBRARY_DIR}/src/background_thread.c
|
||||
${LIBRARY_DIR}/src/base.c
|
||||
${LIBRARY_DIR}/src/bin.c
|
||||
${LIBRARY_DIR}/src/bitmap.c
|
||||
${LIBRARY_DIR}/src/ckh.c
|
||||
${LIBRARY_DIR}/src/ctl.c
|
||||
${LIBRARY_DIR}/src/div.c
|
||||
${LIBRARY_DIR}/src/extent.c
|
||||
${LIBRARY_DIR}/src/extent_dss.c
|
||||
${LIBRARY_DIR}/src/extent_mmap.c
|
||||
${LIBRARY_DIR}/src/hash.c
|
||||
${LIBRARY_DIR}/src/hook.c
|
||||
${LIBRARY_DIR}/src/jemalloc.c
|
||||
${LIBRARY_DIR}/src/large.c
|
||||
${LIBRARY_DIR}/src/log.c
|
||||
${LIBRARY_DIR}/src/malloc_io.c
|
||||
${LIBRARY_DIR}/src/mutex.c
|
||||
${LIBRARY_DIR}/src/mutex_pool.c
|
||||
${LIBRARY_DIR}/src/nstime.c
|
||||
${LIBRARY_DIR}/src/pages.c
|
||||
${LIBRARY_DIR}/src/prng.c
|
||||
${LIBRARY_DIR}/src/prof.c
|
||||
${LIBRARY_DIR}/src/rtree.c
|
||||
${LIBRARY_DIR}/src/sc.c
|
||||
${LIBRARY_DIR}/src/stats.c
|
||||
${LIBRARY_DIR}/src/sz.c
|
||||
${LIBRARY_DIR}/src/tcache.c
|
||||
${LIBRARY_DIR}/src/test_hooks.c
|
||||
${LIBRARY_DIR}/src/ticker.c
|
||||
${LIBRARY_DIR}/src/tsd.c
|
||||
${LIBRARY_DIR}/src/witness.c
|
||||
${LIBRARY_DIR}/src/safety_check.c
|
||||
)
|
||||
if (OS_DARWIN)
|
||||
list(APPEND SRCS ${LIBRARY_DIR}/src/zone.c)
|
||||
endif ()
|
||||
option (USE_INTERNAL_JEMALLOC_LIBRARY "Use internal jemalloc library" ${NOT_UNBUNDLED})
|
||||
|
||||
add_library(jemalloc ${SRCS})
|
||||
target_include_directories(jemalloc PRIVATE ${LIBRARY_DIR}/include)
|
||||
target_include_directories(jemalloc SYSTEM PUBLIC include)
|
||||
if (NOT USE_INTERNAL_JEMALLOC_LIBRARY)
|
||||
find_library(LIBRARY_JEMALLOC jemalloc)
|
||||
find_path(INCLUDE_JEMALLOC jemalloc/jemalloc.h)
|
||||
|
||||
set (JEMALLOC_INCLUDE_PREFIX)
|
||||
# OS_
|
||||
if (OS_LINUX)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_linux")
|
||||
elseif (OS_FREEBSD)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_freebsd")
|
||||
elseif (OS_DARWIN)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_darwin")
|
||||
else ()
|
||||
message (FATAL_ERROR "This OS is not supported")
|
||||
endif ()
|
||||
# ARCH_
|
||||
if (ARCH_AMD64)
|
||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_x86_64")
|
||||
elseif (ARCH_ARM)
|
||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_aarch64")
|
||||
else ()
|
||||
message (FATAL_ERROR "This arch is not supported")
|
||||
endif ()
|
||||
|
||||
configure_file(${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal/jemalloc_internal_defs.h.in
|
||||
${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal/jemalloc_internal_defs.h)
|
||||
target_include_directories(jemalloc SYSTEM PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal)
|
||||
|
||||
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_NO_PRIVATE_NAMESPACE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
|
||||
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_DEBUG=1 -DJEMALLOC_PROF=1)
|
||||
|
||||
if (USE_UNWIND)
|
||||
target_compile_definitions (jemalloc PRIVATE -DJEMALLOC_PROF_LIBUNWIND=1)
|
||||
target_link_libraries (jemalloc PRIVATE unwind)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
target_compile_options(jemalloc PRIVATE -Wno-redundant-decls)
|
||||
# for RTLD_NEXT
|
||||
target_compile_options(jemalloc PRIVATE -D_GNU_SOURCE)
|
||||
else ()
|
||||
find_library(LIBRARY_JEMALLOC jemalloc)
|
||||
find_path(INCLUDE_JEMALLOC jemalloc/jemalloc.h)
|
||||
if (LIBRARY_JEMALLOC AND INCLUDE_JEMALLOC)
|
||||
set(EXTERNAL_JEMALLOC_LIBRARY_FOUND 1)
|
||||
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads REQUIRED)
|
||||
find_package(Threads)
|
||||
|
||||
add_library (jemalloc STATIC IMPORTED)
|
||||
set_property (TARGET jemalloc PROPERTY IMPORTED_LOCATION ${LIBRARY_JEMALLOC})
|
||||
set_property (TARGET jemalloc PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_JEMALLOC})
|
||||
set_property (TARGET jemalloc PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads dl)
|
||||
|
||||
set (CMAKE_REQUIRED_LIBRARIES jemalloc)
|
||||
set (CMAKE_REQUIRED_LIBRARIES ${LIBRARY_JEMALLOC} Threads::Threads "dl")
|
||||
set (CMAKE_REQUIRED_INCLUDES ${INCLUDE_JEMALLOC})
|
||||
check_cxx_source_compiles (
|
||||
"
|
||||
#include <jemalloc/jemalloc.h>
|
||||
|
@ -144,24 +46,145 @@ if (ENABLE_JEMALLOC)
|
|||
free(mallocx(1, 0));
|
||||
}
|
||||
"
|
||||
EXTERNAL_JEMALLOC_WORKS
|
||||
EXTERNAL_JEMALLOC_LIBRARY_WORKS
|
||||
)
|
||||
|
||||
if (NOT EXTERNAL_JEMALLOC_WORKS)
|
||||
message (FATAL_ERROR "jemalloc is unusable: ${LIBRARY_JEMALLOC} ${INCLUDE_JEMALLOC}")
|
||||
if (EXTERNAL_JEMALLOC_LIBRARY_WORKS)
|
||||
add_library (jemalloc STATIC IMPORTED)
|
||||
set_property (TARGET jemalloc PROPERTY IMPORTED_LOCATION ${LIBRARY_JEMALLOC})
|
||||
set_property (TARGET jemalloc PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_JEMALLOC})
|
||||
set_property (TARGET jemalloc PROPERTY INTERFACE_LINK_LIBRARIES Threads::Threads dl)
|
||||
else()
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "External jemalloc is unusable: ${LIBRARY_JEMALLOC} ${INCLUDE_JEMALLOC}")
|
||||
endif ()
|
||||
|
||||
else()
|
||||
set(EXTERNAL_JEMALLOC_LIBRARY_FOUND 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system jemalloc")
|
||||
endif()
|
||||
endif ()
|
||||
|
||||
if (NOT EXTERNAL_JEMALLOC_LIBRARY_FOUND OR NOT EXTERNAL_JEMALLOC_LIBRARY_WORKS)
|
||||
set(USE_INTERNAL_JEMALLOC_LIBRARY 1)
|
||||
|
||||
if (OS_LINUX)
|
||||
# ThreadPool select job randomly, and there can be some threads that had been
|
||||
# performed some memory heavy task before and will be inactive for some time,
|
||||
# but until it will became active again, the memory will not be freed since by
|
||||
# default each thread has it's own arena, but there should be not more then
|
||||
# 4*CPU arenas (see opt.nareans description).
|
||||
#
|
||||
# By enabling percpu_arena number of arenas limited to number of CPUs and hence
|
||||
# this problem should go away.
|
||||
#
|
||||
# muzzy_decay_ms -- use MADV_FREE when available on newer Linuxes, to
|
||||
# avoid spurious latencies and additional work associated with
|
||||
# MADV_DONTNEED. See
|
||||
# https://github.com/ClickHouse/ClickHouse/issues/11121 for motivation.
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "percpu_arena:percpu,oversize_threshold:0,muzzy_decay_ms:10000")
|
||||
else()
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "oversize_threshold:0,muzzy_decay_ms:10000")
|
||||
endif()
|
||||
# CACHE variable is empty, to allow changing defaults without necessity
|
||||
# to purge cache
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE "" CACHE STRING "Change default configuration string of JEMalloc" )
|
||||
if (JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE)
|
||||
set (JEMALLOC_CONFIG_MALLOC_CONF "${JEMALLOC_CONFIG_MALLOC_CONF_OVERRIDE}")
|
||||
endif()
|
||||
message (STATUS "jemalloc malloc_conf: ${JEMALLOC_CONFIG_MALLOC_CONF}")
|
||||
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/jemalloc")
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/src/arena.c
|
||||
${LIBRARY_DIR}/src/background_thread.c
|
||||
${LIBRARY_DIR}/src/base.c
|
||||
${LIBRARY_DIR}/src/bin.c
|
||||
${LIBRARY_DIR}/src/bitmap.c
|
||||
${LIBRARY_DIR}/src/ckh.c
|
||||
${LIBRARY_DIR}/src/ctl.c
|
||||
${LIBRARY_DIR}/src/div.c
|
||||
${LIBRARY_DIR}/src/extent.c
|
||||
${LIBRARY_DIR}/src/extent_dss.c
|
||||
${LIBRARY_DIR}/src/extent_mmap.c
|
||||
${LIBRARY_DIR}/src/hash.c
|
||||
${LIBRARY_DIR}/src/hook.c
|
||||
${LIBRARY_DIR}/src/jemalloc.c
|
||||
${LIBRARY_DIR}/src/large.c
|
||||
${LIBRARY_DIR}/src/log.c
|
||||
${LIBRARY_DIR}/src/malloc_io.c
|
||||
${LIBRARY_DIR}/src/mutex.c
|
||||
${LIBRARY_DIR}/src/mutex_pool.c
|
||||
${LIBRARY_DIR}/src/nstime.c
|
||||
${LIBRARY_DIR}/src/pages.c
|
||||
${LIBRARY_DIR}/src/prng.c
|
||||
${LIBRARY_DIR}/src/prof.c
|
||||
${LIBRARY_DIR}/src/rtree.c
|
||||
${LIBRARY_DIR}/src/sc.c
|
||||
${LIBRARY_DIR}/src/stats.c
|
||||
${LIBRARY_DIR}/src/sz.c
|
||||
${LIBRARY_DIR}/src/tcache.c
|
||||
${LIBRARY_DIR}/src/test_hooks.c
|
||||
${LIBRARY_DIR}/src/ticker.c
|
||||
${LIBRARY_DIR}/src/tsd.c
|
||||
${LIBRARY_DIR}/src/witness.c
|
||||
${LIBRARY_DIR}/src/safety_check.c
|
||||
)
|
||||
if (OS_DARWIN)
|
||||
list(APPEND SRCS ${LIBRARY_DIR}/src/zone.c)
|
||||
endif ()
|
||||
|
||||
add_library(jemalloc ${SRCS})
|
||||
target_include_directories(jemalloc PRIVATE ${LIBRARY_DIR}/include)
|
||||
target_include_directories(jemalloc SYSTEM PUBLIC include)
|
||||
|
||||
set (JEMALLOC_INCLUDE_PREFIX)
|
||||
# OS_
|
||||
if (OS_LINUX)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_linux")
|
||||
elseif (OS_FREEBSD)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_freebsd")
|
||||
elseif (OS_DARWIN)
|
||||
set (JEMALLOC_INCLUDE_PREFIX "include_darwin")
|
||||
else ()
|
||||
message (FATAL_ERROR "internal jemalloc: This OS is not supported")
|
||||
endif ()
|
||||
# ARCH_
|
||||
if (ARCH_AMD64)
|
||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_x86_64")
|
||||
elseif (ARCH_ARM)
|
||||
set(JEMALLOC_INCLUDE_PREFIX "${JEMALLOC_INCLUDE_PREFIX}_aarch64")
|
||||
else ()
|
||||
message (FATAL_ERROR "internal jemalloc: This arch is not supported")
|
||||
endif ()
|
||||
|
||||
configure_file(${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal/jemalloc_internal_defs.h.in
|
||||
${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal/jemalloc_internal_defs.h)
|
||||
target_include_directories(jemalloc SYSTEM PRIVATE
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${JEMALLOC_INCLUDE_PREFIX}/jemalloc/internal)
|
||||
|
||||
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_NO_PRIVATE_NAMESPACE)
|
||||
|
||||
if (CMAKE_BUILD_TYPE_UC STREQUAL "DEBUG")
|
||||
target_compile_definitions(jemalloc PRIVATE -DJEMALLOC_DEBUG=1 -DJEMALLOC_PROF=1)
|
||||
|
||||
if (USE_UNWIND)
|
||||
target_compile_definitions (jemalloc PRIVATE -DJEMALLOC_PROF_LIBUNWIND=1)
|
||||
target_link_libraries (jemalloc PRIVATE unwind)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
set_property(TARGET jemalloc APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USE_JEMALLOC=1)
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
# To detect whether we need to register jemalloc for osx as default zone.
|
||||
set_property(TARGET jemalloc APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS BUNDLED_STATIC_JEMALLOC=1)
|
||||
endif()
|
||||
target_compile_options(jemalloc PRIVATE -Wno-redundant-decls)
|
||||
# for RTLD_NEXT
|
||||
target_compile_options(jemalloc PRIVATE -D_GNU_SOURCE)
|
||||
|
||||
message (STATUS "Using jemalloc")
|
||||
else ()
|
||||
add_library(jemalloc INTERFACE)
|
||||
target_compile_definitions(jemalloc INTERFACE USE_JEMALLOC=0)
|
||||
|
||||
message (STATUS "Not using jemalloc")
|
||||
set (USE_INTERNAL_JEMALLOC_LIBRARY 1)
|
||||
endif ()
|
||||
|
||||
set_property(TARGET jemalloc APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USE_JEMALLOC=1)
|
||||
if (MAKE_STATIC_LIBRARIES)
|
||||
# To detect whether we need to register jemalloc for osx as default zone.
|
||||
set_property(TARGET jemalloc APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS BUNDLED_STATIC_JEMALLOC=1)
|
||||
endif()
|
||||
|
||||
message (STATUS "Using jemalloc")
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
Subproject commit 99f7ad2831a01f264c07eed42a0a3a9336b86184
|
|
@ -0,0 +1,670 @@
|
|||
find_program(AWK_PROGRAM awk)
|
||||
if(NOT AWK_PROGRAM)
|
||||
message(FATAL_ERROR "You need the awk program to build ClickHouse with krb5 enabled.")
|
||||
endif()
|
||||
|
||||
set(KRB5_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/krb5/src)
|
||||
|
||||
set(ALL_SRCS
|
||||
${KRB5_SOURCE_DIR}/util/et/et_name.c
|
||||
${KRB5_SOURCE_DIR}/util/et/com_err.c
|
||||
${KRB5_SOURCE_DIR}/util/et/error_message.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_names.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_rel_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_unwrap_aead.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_set_name_attr.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_glue.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_imp_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/gssd_pname_to_uid.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_authorize_localname.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_prf.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_acquire_cred_with_pw.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_set_cred_option.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_map_name_to_any.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_rel_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_seal.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_delete_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_context_time.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_get_name_attr.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_mech_invoke.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_unwrap_iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_exp_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_init_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_accept_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_verify.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_sign.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_mechname.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_mechattr.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_complete_auth_token.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_wrap_aead.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_cred_oid.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_rel_buffer.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_initialize.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_export_name_comp.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_set_context_option.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_acquire_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_acquire_cred_imp_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_imp_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_set_neg_mechs.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_export_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_oid_ops.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_inq_context_oid.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_del_name_attr.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_decapsulate_token.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_compare_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_rel_name_mapping.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_imp_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_dup_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_export_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_wrap_iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_rel_oid_set.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_unseal.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_store_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_buffer_set.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_canon_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_dsp_status.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_dsp_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_dsp_name_ext.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_saslname.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_process_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_encapsulate_token.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue/g_negoex.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/delete_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/lucid_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/duplicate_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/get_tkt_flags.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/set_allowable_enctypes.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5sealiov.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/gssapi_err_krb5.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/canon_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/inq_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/export_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/inq_names.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/prf.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5sealv3iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/store_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/import_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/export_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/naming_exts.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/s4u_gss_glue.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/rel_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5unsealiov.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/gssapi_krb5.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/disp_status.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/import_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5seal.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/accept_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/import_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/process_context_token.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/disp_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/wrap_size_limit.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/krb5_gss_glue.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/util_crypt.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/set_ccache.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/export_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/rel_oid.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/val_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/context_time.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/cred_store.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/iakerb.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/copy_ccache.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/init_sec_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/indicate_mechs.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/inq_context.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/util_seed.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/util_seqnum.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/compare_name.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/ser_sctx.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5sealv3.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/acquire_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/k5unseal.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/rel_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5/util_cksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/disp_com_err_status.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/gssapi_generic.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/rel_oid_set.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/oid_ops.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_buffer.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_buffer_set.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_set.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_token.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/gssapi_err_generic.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/disp_major_status.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_seqstate.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/util_errmap.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/rel_buffer.c
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/spnego/spnego_mech.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/spnego/negoex_util.c
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/spnego/negoex_ctx.c
|
||||
|
||||
# ${KRB5_SOURCE_DIR}/lib/gssapi/spnego/negoex_trace.c
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prng.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_dk_cmac.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/crc32.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_cbc.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enctype_util.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_etm.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/combine_keys.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/default_state.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/decrypt_iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_dk_cmac.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/etypes.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/old_api_glue.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/cksumtypes.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_cmac.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_old.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/decrypt.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_dk.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/s2k_des.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_unkeyed.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/crypto_length.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/block_size.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/string_to_key.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/verify_checksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/crypto_libinit.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/derive.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/random_to_key.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/verify_checksum_iov.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_confounder.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_length.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_dk_hmac.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/make_checksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_des.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/coll_proof_cksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_rc4.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/cf2.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/aead.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/encrypt_iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/cksumtype_to_string.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/key.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/enc_raw.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/keylengths.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_hmac_md5.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/keyed_cksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/keyed_checksum_types.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_aes2.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/state.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_dk_hmac.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/encrypt.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/checksum_etm.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/make_random_key.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/string_to_cksumtype.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/mandatory_sumtype.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/make_checksum_iov.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/s2k_rc4.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/valid_cksumtype.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/nfold.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prng_fortuna.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/encrypt_length.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/cmac.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/keyblocks.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/prf_rc4.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb/s2k_pbkdf2.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/aes.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/des.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/rc4.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/des3.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/enc_provider/camellia.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/sha256.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/hmac.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/pbkdf2.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/init.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/stubs.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/crypto/openssl/hash_provider/hash_crc32.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/hash_provider/hash_evp.c
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl/des/des_keys.c
|
||||
${KRB5_SOURCE_DIR}/util/support/fake-addrinfo.c
|
||||
${KRB5_SOURCE_DIR}/util/support/k5buf.c
|
||||
${KRB5_SOURCE_DIR}/util/support/hex.c
|
||||
${KRB5_SOURCE_DIR}/util/support/threads.c
|
||||
${KRB5_SOURCE_DIR}/util/support/utf8.c
|
||||
${KRB5_SOURCE_DIR}/util/support/hashtab.c
|
||||
${KRB5_SOURCE_DIR}/util/support/dir_filenames.c
|
||||
${KRB5_SOURCE_DIR}/util/support/base64.c
|
||||
${KRB5_SOURCE_DIR}/util/support/strerror_r.c
|
||||
${KRB5_SOURCE_DIR}/util/support/plugins.c
|
||||
${KRB5_SOURCE_DIR}/util/support/path.c
|
||||
${KRB5_SOURCE_DIR}/util/support/init-addrinfo.c
|
||||
${KRB5_SOURCE_DIR}/util/support/json.c
|
||||
${KRB5_SOURCE_DIR}/util/support/errors.c
|
||||
${KRB5_SOURCE_DIR}/util/support/utf8_conv.c
|
||||
${KRB5_SOURCE_DIR}/util/support/strlcpy.c
|
||||
${KRB5_SOURCE_DIR}/util/support/gmt_mktime.c
|
||||
${KRB5_SOURCE_DIR}/util/support/zap.c
|
||||
${KRB5_SOURCE_DIR}/util/support/bcmp.c
|
||||
${KRB5_SOURCE_DIR}/util/support/secure_getenv.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_tree.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_file.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_parse.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_get.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_set.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_err.c
|
||||
${KRB5_SOURCE_DIR}/util/profile/prof_init.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/fwd_tgt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/conv_creds.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/fast.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_adata.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_tick.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/enc_keyhelper.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_actx.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/init_ctx.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth2.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_princ.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/parse_host_string.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/pr_to_salt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_req.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/pac_sign.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_addrs.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/conv_princ.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_rep.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/str_conv.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gic_opt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/recvauth.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_cksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ai_authdata.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_ctx.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/appdefault.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/bld_princ.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/in_tkt_sky.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_creds.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/auth_con.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_key.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/kdc_rep_dc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gic_keytab.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_req_dec.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/set_realm.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_sam2.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/libdef_parse.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/privsafe.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_auth.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/val_renew.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/addr_order.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/authdata_dec.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/walk_rtree.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gen_subkey.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_auth.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/chpw.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_req.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/allow_weak.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_rep.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_priv.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/s4u_authdata.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_otp.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/init_keyblock.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_addr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/encrypt_tk.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/s4u_creds.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/srv_dec_tkt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_priv.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/authdata_enc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/authdata_exp.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/decode_kdc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/decrypt_tk.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/enc_helper.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_req_ext.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_key.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_encts.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/send_tgs.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_cksum.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/tgtname.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/encode_kdc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_cred.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_safe.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_pkinit.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/srv_rcache.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/chk_trans.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/etype_list.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/get_creds.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/ser_princ.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gic_pwd.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/authdata.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gen_save_subkey.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/vfy_increds.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/addr_comp.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/kfree.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/response_items.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/serialize.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/cammac_util.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gc_via_tkt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_ctx.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/sendauth.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/addr_srch.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_safe.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/preauth_ec.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/bld_pr_ext.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/random_str.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/sname_match.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/princ_comp.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/get_in_tkt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/gen_seqnum.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/cp_key_cnt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/mk_error.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_athctr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/deltat.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/get_etype_info.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/plugin.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/kerrs.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/vic_opt.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/unparse.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/parse.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/rd_error.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/pac.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/valid_times.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/copy_data.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb/padata.c
|
||||
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostrealm.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/thread_safe.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/krbfileio.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/toffset.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostaddr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/ustime.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/timeofday.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/ccdefname.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/full_ipadr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/read_pwd.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/trace.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localauth_k5login.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localauth_rule.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localaddr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostrealm_dns.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostrealm_domain.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/sn2princ.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/net_write.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/gen_rname.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/net_read.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/accessor.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostrealm_profile.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/c_ustime.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/expand_path.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/port2ip.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/changepw.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/unlck_file.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/gen_port.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localauth_an2ln.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/genaddrs.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/init_os_ctx.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localauth.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/locate_kdc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/prompter.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/ktdefname.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/realm_dom.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/dnssrv.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/mk_faddr.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/krb5/os/dnsglue.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/sendto_kdc.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/hostrealm_registry.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/write_msg.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/localauth_names.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/read_msg.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os/lock_file.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccselect.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccselect_realm.c
|
||||
# ${KRB5_SOURCE_DIR}/lib/krb5/ccache/ser_cc.c
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccdefops.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_retr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccselect_k5identity.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cccopy.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccfns.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_file.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccbase.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cccursor.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccdefault.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_memory.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccmarshal.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccselect_hostname.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_dir.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_keyring.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/cc_kcm.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktadd.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktbase.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktdefault.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/kt_memory.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktfns.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktremove.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/read_servi.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/kt_file.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/read_servi.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab/ktfr_entry.c
|
||||
|
||||
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/k5e1_err.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/kdb5_err.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/asn1_err.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/krb5_err.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/krb524_err.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/kv5m_err.c
|
||||
|
||||
|
||||
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache/rc_base.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache/rc_dfl.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache/rc_file2.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache/rc_none.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache/memrcache.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/unicode/ucdata/ucdata.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/unicode/ucstr.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/asn.1/asn1_encode.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/asn.1/asn1_k_encode.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/asn.1/ldap_key_seq.c
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/krb5_libinit.c
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${KRB5_SOURCE_DIR}/util/et/compile_et
|
||||
COMMAND /bin/sh
|
||||
./config_script
|
||||
./compile_et.sh
|
||||
"/usr/local/share/et"
|
||||
${AWK_PROGRAM}
|
||||
sed
|
||||
>
|
||||
compile_et
|
||||
DEPENDS ${KRB5_SOURCE_DIR}/util/et/compile_et.sh ${KRB5_SOURCE_DIR}/util/et/config_script
|
||||
WORKING_DIRECTORY "${KRB5_SOURCE_DIR}/util/et"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
CREATE_COMPILE_ET ALL
|
||||
DEPENDS ${KRB5_SOURCE_DIR}/util/et/compile_et
|
||||
COMMENT "creating compile_et"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
file(GLOB_RECURSE ET_FILES
|
||||
"${KRB5_SOURCE_DIR}/*.et"
|
||||
)
|
||||
|
||||
function(preprocess_et out_var)
|
||||
set(result)
|
||||
foreach(in_f ${ARGN})
|
||||
string(REPLACE
|
||||
.et
|
||||
.c
|
||||
F_C
|
||||
${in_f}
|
||||
)
|
||||
string(REPLACE
|
||||
.et
|
||||
.h
|
||||
F_H
|
||||
${in_f}
|
||||
)
|
||||
|
||||
get_filename_component(ET_PATH ${in_f} DIRECTORY)
|
||||
|
||||
add_custom_command(OUTPUT ${F_C} ${F_H}
|
||||
COMMAND perl ${KRB5_SOURCE_DIR}/util/et/compile_et -d "${KRB5_SOURCE_DIR}/util/et" ${in_f}
|
||||
DEPENDS ${in_f} ${KRB5_SOURCE_DIR}/util/et/compile_et
|
||||
WORKING_DIRECTORY ${ET_PATH}
|
||||
COMMENT "Creating preprocessed file ${F_C}"
|
||||
VERBATIM
|
||||
)
|
||||
list(APPEND result ${F_C})
|
||||
endforeach()
|
||||
set(${out_var} "${result}" PARENT_SCOPE)
|
||||
endfunction()
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${KRB5_SOURCE_DIR}/lib/gssapi/krb5/error_map.h
|
||||
COMMAND perl
|
||||
-I../../../util
|
||||
../../../util/gen-map.pl
|
||||
-oerror_map.h
|
||||
NAME=gsserrmap
|
||||
KEY=OM_uint32
|
||||
VALUE=char*
|
||||
COMPARE=compare_OM_uint32
|
||||
FREEVALUE=free_string
|
||||
WORKING_DIRECTORY "${KRB5_SOURCE_DIR}/lib/gssapi/krb5"
|
||||
)
|
||||
|
||||
|
||||
add_custom_target(
|
||||
ERROR_MAP_H ALL
|
||||
DEPENDS ${KRB5_SOURCE_DIR}/lib/gssapi/krb5/error_map.h
|
||||
COMMENT "generating error_map.h"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${KRB5_SOURCE_DIR}/lib/gssapi/generic/errmap.h
|
||||
COMMAND perl -w -I../../../util ../../../util/gen.pl bimap errmap.h NAME=mecherrmap LEFT=OM_uint32 RIGHT=struct\ mecherror LEFTPRINT=print_OM_uint32 RIGHTPRINT=mecherror_print LEFTCMP=cmp_OM_uint32 RIGHTCMP=mecherror_cmp
|
||||
WORKING_DIRECTORY "${KRB5_SOURCE_DIR}/lib/gssapi/generic"
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
ERRMAP_H ALL
|
||||
DEPENDS ${KRB5_SOURCE_DIR}/lib/gssapi/generic/errmap.h
|
||||
COMMENT "generating errmap.h"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_custom_target(
|
||||
KRB_5_H ALL
|
||||
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/include/krb5/krb5.h
|
||||
COMMENT "generating krb5.h"
|
||||
VERBATIM
|
||||
)
|
||||
|
||||
add_library(${KRB5_LIBRARY})
|
||||
|
||||
add_dependencies(
|
||||
${KRB5_LIBRARY}
|
||||
ERRMAP_H
|
||||
ERROR_MAP_H
|
||||
KRB_5_H
|
||||
)
|
||||
|
||||
preprocess_et(processed_et_files ${ET_FILES})
|
||||
|
||||
add_custom_command(
|
||||
OUTPUT ${KRB5_SOURCE_DIR}/lib/gssapi/generic/errmap.h
|
||||
COMMAND perl -w -I../../../util ../../../util/gen.pl bimap errmap.h NAME=mecherrmap LEFT=OM_uint32 RIGHT=struct\ mecherror LEFTPRINT=print_OM_uint32 RIGHTPRINT=mecherror_print LEFTCMP=cmp_OM_uint32 RIGHTCMP=mecherror_cmp
|
||||
WORKING_DIRECTORY "${KRB5_SOURCE_DIR}/lib/gssapi/generic"
|
||||
)
|
||||
|
||||
target_sources(${KRB5_LIBRARY} PRIVATE
|
||||
${ALL_SRCS}
|
||||
)
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/gssapi
|
||||
)
|
||||
|
||||
file(GLOB GSSAPI_GENERIC_HEADERS
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/*.h
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic/gssapi.hin
|
||||
)
|
||||
|
||||
file(COPY ${GSSAPI_GENERIC_HEADERS}
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/gssapi/
|
||||
)
|
||||
|
||||
file(RENAME
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/gssapi/gssapi.hin
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/gssapi/gssapi.h
|
||||
)
|
||||
|
||||
file(COPY ${KRB5_SOURCE_DIR}/lib/gssapi/krb5/gssapi_krb5.h
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/gssapi/
|
||||
)
|
||||
|
||||
file(COPY ${KRB5_SOURCE_DIR}/util/et/com_err.h
|
||||
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/include/
|
||||
)
|
||||
|
||||
file(MAKE_DIRECTORY
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include/krb5
|
||||
)
|
||||
|
||||
SET(KRBHDEP
|
||||
${KRB5_SOURCE_DIR}/include/krb5/krb5.hin
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/krb5_err.h
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/k5e1_err.h
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/kdb5_err.h
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/kv5m_err.h
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/krb524_err.h
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/error_tables/asn1_err.h
|
||||
)
|
||||
|
||||
# cmake < 3.18 does not have 'cat' command
|
||||
add_custom_command(
|
||||
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/include/krb5/krb5.h
|
||||
COMMAND cat ${KRBHDEP} > ${CMAKE_CURRENT_BINARY_DIR}/include/krb5/krb5.h
|
||||
DEPENDS ${KRBHDEP}
|
||||
)
|
||||
|
||||
|
||||
|
||||
target_include_directories(${KRB5_LIBRARY} PUBLIC
|
||||
${KRB5_SOURCE_DIR}/include
|
||||
${CMAKE_CURRENT_BINARY_DIR}/include
|
||||
)
|
||||
|
||||
target_include_directories(${KRB5_LIBRARY} PRIVATE
|
||||
${CMAKE_CURRENT_SOURCE_DIR} #for autoconf.h
|
||||
${KRB5_SOURCE_DIR}
|
||||
${KRB5_SOURCE_DIR}/include
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/mechglue
|
||||
${KRB5_SOURCE_DIR}/lib/
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/generic
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/krb5
|
||||
${KRB5_SOURCE_DIR}/lib/gssapi/spnego
|
||||
${KRB5_SOURCE_DIR}/util/et
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/openssl
|
||||
${KRB5_SOURCE_DIR}/lib/crypto/krb
|
||||
${KRB5_SOURCE_DIR}/util/profile
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache/ccapi
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/ccache
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/keytab
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/rcache
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/unicode
|
||||
${KRB5_SOURCE_DIR}/lib/krb5/os
|
||||
# ${OPENSSL_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
target_compile_definitions(${KRB5_LIBRARY} PRIVATE
|
||||
KRB5_PRIVATE
|
||||
_GSS_STATIC_LINK=1
|
||||
KRB5_DEPRECATED=1
|
||||
LOCALEDIR="/usr/local/share/locale"
|
||||
BINDIR="/usr/local/bin"
|
||||
SBINDIR="/usr/local/sbin"
|
||||
LIBDIR="/usr/local/lib"
|
||||
)
|
||||
|
||||
target_link_libraries(${KRB5_LIBRARY}
|
||||
PRIVATE ${OPENSSL_CRYPTO_LIBRARY}
|
||||
)
|
|
@ -0,0 +1,764 @@
|
|||
/* include/autoconf.h. Generated from autoconf.h.in by configure. */
|
||||
/* include/autoconf.h.in. Generated from configure.in by autoheader. */
|
||||
|
||||
|
||||
#ifndef KRB5_AUTOCONF_H
|
||||
#define KRB5_AUTOCONF_H
|
||||
|
||||
|
||||
/* Define if AES-NI support is enabled */
|
||||
/* #undef AESNI */
|
||||
|
||||
/* Define if socket can't be bound to 0.0.0.0 */
|
||||
/* #undef BROKEN_STREAMS_SOCKETS */
|
||||
|
||||
/* Define if va_list objects can be simply copied by assignment. */
|
||||
/* #undef CAN_COPY_VA_LIST */
|
||||
|
||||
/* Define to reduce code size even if it means more cpu usage */
|
||||
/* #undef CONFIG_SMALL */
|
||||
|
||||
/* Define if __attribute__((constructor)) works */
|
||||
#define CONSTRUCTOR_ATTR_WORKS 1
|
||||
|
||||
/* Define to default ccache name */
|
||||
#define DEFCCNAME "FILE:/tmp/krb5cc_%{uid}"
|
||||
|
||||
/* Define to default client keytab name */
|
||||
#define DEFCKTNAME "FILE:/etc/krb5/user/%{euid}/client.keytab"
|
||||
|
||||
/* Define to default keytab name */
|
||||
#define DEFKTNAME "FILE:/etc/krb5.keytab"
|
||||
|
||||
/* Define if library initialization should be delayed until first use */
|
||||
#define DELAY_INITIALIZER 1
|
||||
|
||||
/* Define if __attribute__((destructor)) works */
|
||||
#define DESTRUCTOR_ATTR_WORKS 1
|
||||
|
||||
/* Define to disable PKINIT plugin support */
|
||||
/* #undef DISABLE_PKINIT */
|
||||
|
||||
/* Define if LDAP KDB support within the Kerberos library (mainly ASN.1 code)
|
||||
should be enabled. */
|
||||
/* #undef ENABLE_LDAP */
|
||||
|
||||
/* Define if translation functions should be used. */
|
||||
#define ENABLE_NLS 1
|
||||
|
||||
/* Define if thread support enabled */
|
||||
#define ENABLE_THREADS 1
|
||||
|
||||
/* Define as return type of endrpcent */
|
||||
#define ENDRPCENT_TYPE void
|
||||
|
||||
/* Define if Fortuna PRNG is selected */
|
||||
#define FORTUNA 1
|
||||
|
||||
/* Define to the type of elements in the array set by `getgroups'. Usually
|
||||
this is either `int' or `gid_t'. */
|
||||
#define GETGROUPS_T gid_t
|
||||
|
||||
/* Define if gethostbyname_r returns int rather than struct hostent * */
|
||||
#define GETHOSTBYNAME_R_RETURNS_INT 1
|
||||
|
||||
/* Type of getpeername second argument. */
|
||||
#define GETPEERNAME_ARG3_TYPE GETSOCKNAME_ARG3_TYPE
|
||||
|
||||
/* Define if getpwnam_r exists but takes only 4 arguments (e.g., POSIX draft 6
|
||||
implementations like some Solaris releases). */
|
||||
/* #undef GETPWNAM_R_4_ARGS */
|
||||
|
||||
/* Define if getpwnam_r returns an int */
|
||||
#define GETPWNAM_R_RETURNS_INT 1
|
||||
|
||||
/* Define if getpwuid_r exists but takes only 4 arguments (e.g., POSIX draft 6
|
||||
implementations like some Solaris releases). */
|
||||
/* #undef GETPWUID_R_4_ARGS */
|
||||
|
||||
/* Define if getservbyname_r returns int rather than struct servent * */
|
||||
#define GETSERVBYNAME_R_RETURNS_INT 1
|
||||
|
||||
/* Type of pointer target for argument 3 to getsockname */
|
||||
#define GETSOCKNAME_ARG3_TYPE socklen_t
|
||||
|
||||
/* Define if gmtime_r returns int instead of struct tm pointer, as on old
|
||||
HP-UX systems. */
|
||||
/* #undef GMTIME_R_RETURNS_INT */
|
||||
|
||||
/* Define if va_copy macro or function is available. */
|
||||
#define HAS_VA_COPY 1
|
||||
|
||||
/* Define to 1 if you have the `access' function. */
|
||||
#define HAVE_ACCESS 1
|
||||
|
||||
/* Define to 1 if you have the <alloca.h> header file. */
|
||||
#define HAVE_ALLOCA_H 1
|
||||
|
||||
/* Define to 1 if you have the <arpa/inet.h> header file. */
|
||||
#define HAVE_ARPA_INET_H 1
|
||||
|
||||
/* Define to 1 if you have the `bswap16' function. */
|
||||
/* #undef HAVE_BSWAP16 */
|
||||
|
||||
/* Define to 1 if you have the `bswap64' function. */
|
||||
/* #undef HAVE_BSWAP64 */
|
||||
|
||||
/* Define to 1 if bswap_16 is available via byteswap.h */
|
||||
#define HAVE_BSWAP_16 1
|
||||
|
||||
/* Define to 1 if bswap_64 is available via byteswap.h */
|
||||
#define HAVE_BSWAP_64 1
|
||||
|
||||
/* Define if bt_rseq is available, for recursive btree traversal. */
|
||||
#define HAVE_BT_RSEQ 1
|
||||
|
||||
/* Define to 1 if you have the <byteswap.h> header file. */
|
||||
#define HAVE_BYTESWAP_H 1
|
||||
|
||||
/* Define to 1 if you have the `chmod' function. */
|
||||
#define HAVE_CHMOD 1
|
||||
|
||||
/* Define if cmocka library is available. */
|
||||
/* #undef HAVE_CMOCKA */
|
||||
|
||||
/* Define to 1 if you have the `compile' function. */
|
||||
/* #undef HAVE_COMPILE */
|
||||
|
||||
/* Define if com_err has compatible gettext support */
|
||||
#define HAVE_COM_ERR_INTL 1
|
||||
|
||||
/* Define to 1 if you have the <cpuid.h> header file. */
|
||||
/* #undef HAVE_CPUID_H */
|
||||
|
||||
/* Define to 1 if you have the `daemon' function. */
|
||||
#define HAVE_DAEMON 1
|
||||
|
||||
/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you
|
||||
don't. */
|
||||
#define HAVE_DECL_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the <dirent.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#define HAVE_DLFCN_H 1
|
||||
|
||||
/* Define to 1 if you have the `dn_skipname' function. */
|
||||
#define HAVE_DN_SKIPNAME 0
|
||||
|
||||
/* Define to 1 if you have the <endian.h> header file. */
|
||||
#define HAVE_ENDIAN_H 1
|
||||
|
||||
/* Define to 1 if you have the <errno.h> header file. */
|
||||
#define HAVE_ERRNO_H 1
|
||||
|
||||
/* Define to 1 if you have the `fchmod' function. */
|
||||
#define HAVE_FCHMOD 1
|
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */
|
||||
#define HAVE_FCNTL_H 1
|
||||
|
||||
/* Define to 1 if you have the `flock' function. */
|
||||
#define HAVE_FLOCK 1
|
||||
|
||||
/* Define to 1 if you have the `fnmatch' function. */
|
||||
#define HAVE_FNMATCH 1
|
||||
|
||||
/* Define to 1 if you have the <fnmatch.h> header file. */
|
||||
#define HAVE_FNMATCH_H 1
|
||||
|
||||
/* Define if you have the getaddrinfo function */
|
||||
#define HAVE_GETADDRINFO 1
|
||||
|
||||
/* Define to 1 if you have the `getcwd' function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define to 1 if you have the `getenv' function. */
|
||||
#define HAVE_GETENV 1
|
||||
|
||||
/* Define to 1 if you have the `geteuid' function. */
|
||||
#define HAVE_GETEUID 1
|
||||
|
||||
/* Define if gethostbyname_r exists and its return type is known */
|
||||
#define HAVE_GETHOSTBYNAME_R 1
|
||||
|
||||
/* Define to 1 if you have the `getnameinfo' function. */
|
||||
#define HAVE_GETNAMEINFO 1
|
||||
|
||||
/* Define if system getopt should be used. */
|
||||
#define HAVE_GETOPT 1
|
||||
|
||||
/* Define if system getopt_long should be used. */
|
||||
#define HAVE_GETOPT_LONG 1
|
||||
|
||||
/* Define if getpwnam_r is available and useful. */
|
||||
#define HAVE_GETPWNAM_R 1
|
||||
|
||||
/* Define if getpwuid_r is available and useful. */
|
||||
#define HAVE_GETPWUID_R 1
|
||||
|
||||
/* Define if getservbyname_r exists and its return type is known */
|
||||
#define HAVE_GETSERVBYNAME_R 1
|
||||
|
||||
/* Have the gettimeofday function */
|
||||
#define HAVE_GETTIMEOFDAY 1
|
||||
|
||||
/* Define to 1 if you have the `getusershell' function. */
|
||||
#define HAVE_GETUSERSHELL 1
|
||||
|
||||
/* Define to 1 if you have the `gmtime_r' function. */
|
||||
#define HAVE_GMTIME_R 1
|
||||
|
||||
/* Define to 1 if you have the <ifaddrs.h> header file. */
|
||||
#define HAVE_IFADDRS_H 1
|
||||
|
||||
/* Define to 1 if you have the `inet_ntop' function. */
|
||||
#define HAVE_INET_NTOP 1
|
||||
|
||||
/* Define to 1 if you have the `inet_pton' function. */
|
||||
#define HAVE_INET_PTON 1
|
||||
|
||||
/* Define to 1 if the system has the type `int16_t'. */
|
||||
#define HAVE_INT16_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `int32_t'. */
|
||||
#define HAVE_INT32_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `int8_t'. */
|
||||
#define HAVE_INT8_T 1
|
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */
|
||||
#define HAVE_INTTYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <keyutils.h> header file. */
|
||||
/* #undef HAVE_KEYUTILS_H */
|
||||
|
||||
/* Define to 1 if you have the <lber.h> header file. */
|
||||
/* #undef HAVE_LBER_H */
|
||||
|
||||
/* Define to 1 if you have the <ldap.h> header file. */
|
||||
/* #undef HAVE_LDAP_H */
|
||||
|
||||
/* Define to 1 if you have the `crypto' library (-lcrypto). */
|
||||
#define HAVE_LIBCRYPTO 1
|
||||
|
||||
/* Define if building with libedit. */
|
||||
/* #undef HAVE_LIBEDIT */
|
||||
|
||||
/* Define to 1 if you have the `nsl' library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/* Define to 1 if you have the `resolv' library (-lresolv). */
|
||||
#define HAVE_LIBRESOLV 1
|
||||
|
||||
/* Define to 1 if you have the `socket' library (-lsocket). */
|
||||
/* #undef HAVE_LIBSOCKET */
|
||||
|
||||
/* Define if the util library is available */
|
||||
#define HAVE_LIBUTIL 1
|
||||
|
||||
/* Define to 1 if you have the <limits.h> header file. */
|
||||
#define HAVE_LIMITS_H 1
|
||||
|
||||
/* Define to 1 if you have the `localtime_r' function. */
|
||||
#define HAVE_LOCALTIME_R 1
|
||||
|
||||
/* Define to 1 if you have the <machine/byte_order.h> header file. */
|
||||
/* #undef HAVE_MACHINE_BYTE_ORDER_H */
|
||||
|
||||
/* Define to 1 if you have the <machine/endian.h> header file. */
|
||||
/* #undef HAVE_MACHINE_ENDIAN_H */
|
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */
|
||||
#define HAVE_MEMORY_H 1
|
||||
|
||||
/* Define to 1 if you have the `mkstemp' function. */
|
||||
#define HAVE_MKSTEMP 1
|
||||
|
||||
/* Define to 1 if you have the <ndir.h> header file, and it defines `DIR'. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <netdb.h> header file. */
|
||||
#define HAVE_NETDB_H 1
|
||||
|
||||
/* Define if netdb.h declares h_errno */
|
||||
#define HAVE_NETDB_H_H_ERRNO 1
|
||||
|
||||
/* Define to 1 if you have the <netinet/in.h> header file. */
|
||||
#define HAVE_NETINET_IN_H 1
|
||||
|
||||
/* Define to 1 if you have the `ns_initparse' function. */
|
||||
#define HAVE_NS_INITPARSE 0
|
||||
|
||||
/* Define to 1 if you have the `ns_name_uncompress' function. */
|
||||
#define HAVE_NS_NAME_UNCOMPRESS 0
|
||||
|
||||
/* Define if OpenSSL supports cms. */
|
||||
#define HAVE_OPENSSL_CMS 1
|
||||
|
||||
/* Define to 1 if you have the <paths.h> header file. */
|
||||
#define HAVE_PATHS_H 1
|
||||
|
||||
/* Define if persistent keyrings are supported */
|
||||
/* #undef HAVE_PERSISTENT_KEYRING */
|
||||
|
||||
/* Define to 1 if you have the <poll.h> header file. */
|
||||
#define HAVE_POLL_H 1
|
||||
|
||||
/* Define if #pragma weak references work */
|
||||
#define HAVE_PRAGMA_WEAK_REF 1
|
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */
|
||||
#define HAVE_PTHREAD 1
|
||||
|
||||
/* Define to 1 if you have the `pthread_once' function. */
|
||||
/* #undef HAVE_PTHREAD_ONCE */
|
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */
|
||||
#define HAVE_PTHREAD_PRIO_INHERIT 1
|
||||
|
||||
/* Define to 1 if you have the `pthread_rwlock_init' function. */
|
||||
/* #undef HAVE_PTHREAD_RWLOCK_INIT */
|
||||
|
||||
/* Define if pthread_rwlock_init is provided in the thread library. */
|
||||
#define HAVE_PTHREAD_RWLOCK_INIT_IN_THREAD_LIB 1
|
||||
|
||||
/* Define to 1 if you have the <pwd.h> header file. */
|
||||
#define HAVE_PWD_H 1
|
||||
|
||||
/* Define if building with GNU Readline. */
|
||||
/* #undef HAVE_READLINE */
|
||||
|
||||
/* Define if regcomp exists and functions */
|
||||
#define HAVE_REGCOMP 1
|
||||
|
||||
/* Define to 1 if you have the `regexec' function. */
|
||||
#define HAVE_REGEXEC 1
|
||||
|
||||
/* Define to 1 if you have the <regexpr.h> header file. */
|
||||
/* #undef HAVE_REGEXPR_H */
|
||||
|
||||
/* Define to 1 if you have the <regex.h> header file. */
|
||||
#define HAVE_REGEX_H 1
|
||||
|
||||
/* Define to 1 if you have the `res_nclose' function. */
|
||||
#define HAVE_RES_NCLOSE 1
|
||||
|
||||
/* Define to 1 if you have the `res_ndestroy' function. */
|
||||
/* #undef HAVE_RES_NDESTROY */
|
||||
|
||||
/* Define to 1 if you have the `res_ninit' function. */
|
||||
#define HAVE_RES_NINIT 1
|
||||
|
||||
/* Define to 1 if you have the `res_nsearch' function. */
|
||||
#define HAVE_RES_NSEARCH 0
|
||||
|
||||
/* Define to 1 if you have the `res_search' function */
|
||||
#define HAVE_RES_SEARCH 1
|
||||
|
||||
/* Define to 1 if you have the `re_comp' function. */
|
||||
#define HAVE_RE_COMP 1
|
||||
|
||||
/* Define to 1 if you have the `re_exec' function. */
|
||||
#define HAVE_RE_EXEC 1
|
||||
|
||||
/* Define to 1 if you have the <sasl/sasl.h> header file. */
|
||||
/* #undef HAVE_SASL_SASL_H */
|
||||
|
||||
/* Define if struct sockaddr contains sa_len */
|
||||
/* #undef HAVE_SA_LEN */
|
||||
|
||||
/* Define to 1 if you have the `setegid' function. */
|
||||
#define HAVE_SETEGID 1
|
||||
|
||||
/* Define to 1 if you have the `setenv' function. */
|
||||
#define HAVE_SETENV 1
|
||||
|
||||
/* Define to 1 if you have the `seteuid' function. */
|
||||
#define HAVE_SETEUID 1
|
||||
|
||||
/* Define if setluid provided in OSF/1 security library */
|
||||
/* #undef HAVE_SETLUID */
|
||||
|
||||
/* Define to 1 if you have the `setregid' function. */
|
||||
#define HAVE_SETREGID 1
|
||||
|
||||
/* Define to 1 if you have the `setresgid' function. */
|
||||
#define HAVE_SETRESGID 1
|
||||
|
||||
/* Define to 1 if you have the `setresuid' function. */
|
||||
#define HAVE_SETRESUID 1
|
||||
|
||||
/* Define to 1 if you have the `setreuid' function. */
|
||||
#define HAVE_SETREUID 1
|
||||
|
||||
/* Define to 1 if you have the `setsid' function. */
|
||||
#define HAVE_SETSID 1
|
||||
|
||||
/* Define to 1 if you have the `setvbuf' function. */
|
||||
#define HAVE_SETVBUF 1
|
||||
|
||||
/* Define if there is a socklen_t type. If not, probably use size_t */
|
||||
#define HAVE_SOCKLEN_T 1
|
||||
|
||||
/* Define to 1 if you have the `srand' function. */
|
||||
#define HAVE_SRAND 1
|
||||
|
||||
/* Define to 1 if you have the `srand48' function. */
|
||||
#define HAVE_SRAND48 1
|
||||
|
||||
/* Define to 1 if you have the `srandom' function. */
|
||||
#define HAVE_SRANDOM 1
|
||||
|
||||
/* Define to 1 if the system has the type `ssize_t'. */
|
||||
#define HAVE_SSIZE_T 1
|
||||
|
||||
/* Define to 1 if you have the `stat' function. */
|
||||
#define HAVE_STAT 1
|
||||
|
||||
/* Define to 1 if you have the <stddef.h> header file. */
|
||||
#define HAVE_STDDEF_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */
|
||||
#define HAVE_STDINT_H 1
|
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */
|
||||
#define HAVE_STDLIB_H 1
|
||||
|
||||
/* Define to 1 if you have the `step' function. */
|
||||
/* #undef HAVE_STEP */
|
||||
|
||||
/* Define to 1 if you have the `strchr' function. */
|
||||
#define HAVE_STRCHR 1
|
||||
|
||||
/* Define to 1 if you have the `strdup' function. */
|
||||
#define HAVE_STRDUP 1
|
||||
|
||||
/* Define to 1 if you have the `strerror' function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define to 1 if you have the `strerror_r' function. */
|
||||
#define HAVE_STRERROR_R 1
|
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */
|
||||
#define HAVE_STRINGS_H 1
|
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */
|
||||
#define HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the `strlcpy' function. */
|
||||
/* #undef HAVE_STRLCPY */
|
||||
|
||||
/* Define to 1 if you have the `strptime' function. */
|
||||
#define HAVE_STRPTIME 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct cmsghdr'. */
|
||||
#define HAVE_STRUCT_CMSGHDR 1
|
||||
|
||||
/* Define if there is a struct if_laddrconf. */
|
||||
/* #undef HAVE_STRUCT_IF_LADDRCONF */
|
||||
|
||||
/* Define to 1 if the system has the type `struct in6_pktinfo'. */
|
||||
#define HAVE_STRUCT_IN6_PKTINFO 1
|
||||
|
||||
/* Define to 1 if the system has the type `struct in_pktinfo'. */
|
||||
#define HAVE_STRUCT_IN_PKTINFO 1
|
||||
|
||||
/* Define if there is a struct lifconf. */
|
||||
/* #undef HAVE_STRUCT_LIFCONF */
|
||||
|
||||
/* Define to 1 if the system has the type `struct rt_msghdr'. */
|
||||
/* #undef HAVE_STRUCT_RT_MSGHDR */
|
||||
|
||||
/* Define to 1 if the system has the type `struct sockaddr_storage'. */
|
||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||
|
||||
/* Define to 1 if `st_mtimensec' is a member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_MTIMENSEC */
|
||||
|
||||
/* Define to 1 if `st_mtimespec.tv_nsec' is a member of `struct stat'. */
|
||||
/* #undef HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC */
|
||||
|
||||
/* Define to 1 if `st_mtim.tv_nsec' is a member of `struct stat'. */
|
||||
#define HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC 1
|
||||
|
||||
/* Define to 1 if you have the <sys/bswap.h> header file. */
|
||||
/* #undef HAVE_SYS_BSWAP_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/dir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define if sys_errlist in libc */
|
||||
#define HAVE_SYS_ERRLIST 1
|
||||
|
||||
/* Define to 1 if you have the <sys/file.h> header file. */
|
||||
#define HAVE_SYS_FILE_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/filio.h> header file. */
|
||||
/* #undef HAVE_SYS_FILIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/ndir.h> header file, and it defines `DIR'.
|
||||
*/
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/param.h> header file. */
|
||||
#define HAVE_SYS_PARAM_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/select.h> header file. */
|
||||
#define HAVE_SYS_SELECT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||
#define HAVE_SYS_SOCKET_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/sockio.h> header file. */
|
||||
/* #undef HAVE_SYS_SOCKIO_H */
|
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */
|
||||
#define HAVE_SYS_STAT_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#define HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */
|
||||
#define HAVE_SYS_TYPES_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/uio.h> header file. */
|
||||
#define HAVE_SYS_UIO_H 1
|
||||
|
||||
/* Define if tcl.h found */
|
||||
/* #undef HAVE_TCL_H */
|
||||
|
||||
/* Define if tcl/tcl.h found */
|
||||
/* #undef HAVE_TCL_TCL_H */
|
||||
|
||||
/* Define to 1 if you have the `timegm' function. */
|
||||
#define HAVE_TIMEGM 1
|
||||
|
||||
/* Define to 1 if you have the <time.h> header file. */
|
||||
#define HAVE_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#define HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the `unsetenv' function. */
|
||||
#define HAVE_UNSETENV 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_char'. */
|
||||
#define HAVE_U_CHAR 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_int'. */
|
||||
#define HAVE_U_INT 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_int16_t'. */
|
||||
#define HAVE_U_INT16_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_int32_t'. */
|
||||
#define HAVE_U_INT32_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_int8_t'. */
|
||||
#define HAVE_U_INT8_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `u_long'. */
|
||||
#define HAVE_U_LONG 1
|
||||
|
||||
/* Define to 1 if you have the `vasprintf' function. */
|
||||
#define HAVE_VASPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vsnprintf' function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define to 1 if you have the `vsprintf' function. */
|
||||
#define HAVE_VSPRINTF 1
|
||||
|
||||
/* Define to 1 if the system has the type `__int128_t'. */
|
||||
#define HAVE___INT128_T 1
|
||||
|
||||
/* Define to 1 if the system has the type `__uint128_t'. */
|
||||
#define HAVE___UINT128_T 1
|
||||
|
||||
/* Define if errno.h declares perror */
|
||||
/* #undef HDR_HAS_PERROR */
|
||||
|
||||
/* May need to be defined to enable IPv6 support, for example on IRIX */
|
||||
/* #undef INET6 */
|
||||
|
||||
/* Define if MIT Project Athena default configuration should be used */
|
||||
/* #undef KRB5_ATHENA_COMPAT */
|
||||
|
||||
/* Define for DNS support of locating realms and KDCs */
|
||||
#undef KRB5_DNS_LOOKUP
|
||||
|
||||
/* Define to enable DNS lookups of Kerberos realm names */
|
||||
/* #undef KRB5_DNS_LOOKUP_REALM */
|
||||
|
||||
/* Define if the KDC should return only vague error codes to clients */
|
||||
/* #undef KRBCONF_VAGUE_ERRORS */
|
||||
|
||||
/* define if the system header files are missing prototype for daemon() */
|
||||
/* #undef NEED_DAEMON_PROTO */
|
||||
|
||||
/* Define if in6addr_any is not defined in libc */
|
||||
/* #undef NEED_INSIXADDR_ANY */
|
||||
|
||||
/* define if the system header files are missing prototype for
|
||||
ss_execute_command() */
|
||||
/* #undef NEED_SS_EXECUTE_COMMAND_PROTO */
|
||||
|
||||
/* define if the system header files are missing prototype for strptime() */
|
||||
/* #undef NEED_STRPTIME_PROTO */
|
||||
|
||||
/* define if the system header files are missing prototype for swab() */
|
||||
/* #undef NEED_SWAB_PROTO */
|
||||
|
||||
/* Define if need to declare sys_errlist */
|
||||
/* #undef NEED_SYS_ERRLIST */
|
||||
|
||||
/* define if the system header files are missing prototype for vasprintf() */
|
||||
/* #undef NEED_VASPRINTF_PROTO */
|
||||
|
||||
/* Define if the KDC should use no lookaside cache */
|
||||
/* #undef NOCACHE */
|
||||
|
||||
/* Define if references to pthread routines should be non-weak. */
|
||||
/* #undef NO_WEAK_PTHREADS */
|
||||
|
||||
/* Define if lex produes code with yylineno */
|
||||
/* #undef NO_YYLINENO */
|
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */
|
||||
#define PACKAGE_BUGREPORT "krb5-bugs@mit.edu"
|
||||
|
||||
/* Define to the full name of this package. */
|
||||
#define PACKAGE_NAME "Kerberos 5"
|
||||
|
||||
/* Define to the full name and version of this package. */
|
||||
#define PACKAGE_STRING "Kerberos 5 1.17.1"
|
||||
|
||||
/* Define to the one symbol short name of this package. */
|
||||
#define PACKAGE_TARNAME "krb5"
|
||||
|
||||
/* Define to the home page for this package. */
|
||||
#define PACKAGE_URL ""
|
||||
|
||||
/* Define to the version of this package. */
|
||||
#define PACKAGE_VERSION "1.17.1"
|
||||
|
||||
/* Define if setjmp indicates POSIX interface */
|
||||
/* #undef POSIX_SETJMP */
|
||||
|
||||
/* Define if POSIX signal handling is used */
|
||||
#define POSIX_SIGNALS 1
|
||||
|
||||
/* Define if POSIX signal handlers are used */
|
||||
#define POSIX_SIGTYPE 1
|
||||
|
||||
/* Define if termios.h exists and tcsetattr exists */
|
||||
#define POSIX_TERMIOS 1
|
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */
|
||||
/* #undef PTHREAD_CREATE_JOINABLE */
|
||||
|
||||
/* Define as the return type of signal handlers (`int' or `void'). */
|
||||
#define RETSIGTYPE void
|
||||
|
||||
/* Define as return type of setrpcent */
|
||||
#define SETRPCENT_TYPE void
|
||||
|
||||
/* The size of `size_t', as computed by sizeof. */
|
||||
#define SIZEOF_SIZE_T 8
|
||||
|
||||
/* The size of `time_t', as computed by sizeof. */
|
||||
#define SIZEOF_TIME_T 8
|
||||
|
||||
/* Define to use OpenSSL for SPAKE preauth */
|
||||
#define SPAKE_OPENSSL 1
|
||||
|
||||
/* Define for static plugin linkage */
|
||||
/* #undef STATIC_PLUGINS */
|
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define to 1 if strerror_r returns char *. */
|
||||
#define STRERROR_R_CHAR_P 1
|
||||
|
||||
/* Define if sys_errlist is defined in errno.h */
|
||||
#define SYS_ERRLIST_DECLARED 1
|
||||
|
||||
/* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
|
||||
#define TIME_WITH_SYS_TIME 1
|
||||
|
||||
/* Define if no TLS implementation is selected */
|
||||
/* #undef TLS_IMPL_NONE */
|
||||
|
||||
/* Define if TLS implementation is OpenSSL */
|
||||
#define TLS_IMPL_OPENSSL 1
|
||||
|
||||
/* Define if you have dirent.h functionality */
|
||||
#define USE_DIRENT_H 1
|
||||
|
||||
/* Define if dlopen should be used */
|
||||
#define USE_DLOPEN 1
|
||||
|
||||
/* Define if the keyring ccache should be enabled */
|
||||
/* #undef USE_KEYRING_CCACHE */
|
||||
|
||||
/* Define if link-time options for library finalization will be used */
|
||||
/* #undef USE_LINKER_FINI_OPTION */
|
||||
|
||||
/* Define if link-time options for library initialization will be used */
|
||||
/* #undef USE_LINKER_INIT_OPTION */
|
||||
|
||||
/* Define if sigprocmask should be used */
|
||||
#define USE_SIGPROCMASK 1
|
||||
|
||||
/* Define if wait takes int as a argument */
|
||||
#define WAIT_USES_INT 1
|
||||
|
||||
/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
|
||||
`char[]'. */
|
||||
#define YYTEXT_POINTER 1
|
||||
|
||||
/* Define to enable extensions in glibc */
|
||||
#define _GNU_SOURCE 1
|
||||
|
||||
/* Define to enable C11 extensions */
|
||||
#define __STDC_WANT_LIB_EXT1__ 1
|
||||
|
||||
/* Define to empty if `const' does not conform to ANSI C. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef gid_t */
|
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */
|
||||
#ifndef __cplusplus
|
||||
/* #undef inline */
|
||||
#endif
|
||||
|
||||
/* Define krb5_sigtype to type of signal handler */
|
||||
#define krb5_sigtype void
|
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long int' if <sys/types.h> does not define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> does not define. */
|
||||
/* #undef time_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef uid_t */
|
||||
|
||||
|
||||
#if defined(__GNUC__) && !defined(inline)
|
||||
/* Silence gcc pedantic warnings about ANSI C. */
|
||||
# define inline __inline__
|
||||
#endif
|
||||
#endif /* KRB5_AUTOCONF_H */
|
|
@ -0,0 +1,141 @@
|
|||
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
|
||||
/*
|
||||
* Copyright 1990,1991,2008 by the Massachusetts Institute of Technology.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Export of this software from the United States of America may
|
||||
* require a specific license from the United States Government.
|
||||
* It is the responsibility of any person or organization contemplating
|
||||
* export to obtain such a license before exporting.
|
||||
*
|
||||
* WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
|
||||
* distribute this software and its documentation for any purpose and
|
||||
* without fee is hereby granted, provided that the above copyright
|
||||
* notice appear in all copies and that both that copyright notice and
|
||||
* this permission notice appear in supporting documentation, and that
|
||||
* the name of M.I.T. not be used in advertising or publicity pertaining
|
||||
* to distribution of the software without specific, written prior
|
||||
* permission. Furthermore if you modify this software you must label
|
||||
* your software as modified software and not distribute it in such a
|
||||
* fashion that it might be confused with the original M.I.T. software.
|
||||
* M.I.T. makes no representations about the suitability of
|
||||
* this software for any purpose. It is provided "as is" without express
|
||||
* or implied warranty.
|
||||
*/
|
||||
|
||||
/* Site- and OS- dependent configuration */
|
||||
|
||||
#ifndef KRB5_OSCONF__
|
||||
#define KRB5_OSCONF__
|
||||
|
||||
#if !defined(_WIN32)
|
||||
/* Don't try to pull in autoconf.h for Windows, since it's not used */
|
||||
#ifndef KRB5_AUTOCONF__
|
||||
#define KRB5_AUTOCONF__
|
||||
#include "autoconf.h"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(__MACH__) && defined(__APPLE__)
|
||||
# include <TargetConditionals.h>
|
||||
#endif
|
||||
|
||||
#if defined(_WIN32)
|
||||
#define DEFAULT_PROFILE_FILENAME "krb5.ini"
|
||||
#else /* !_WINDOWS */
|
||||
#if TARGET_OS_MAC
|
||||
#define DEFAULT_SECURE_PROFILE_PATH "/Library/Preferences/edu.mit.Kerberos:/etc/krb5.conf:/usr/local/etc/krb5.conf"
|
||||
#define DEFAULT_PROFILE_PATH ("~/Library/Preferences/edu.mit.Kerberos" ":" DEFAULT_SECURE_PROFILE_PATH)
|
||||
#define KRB5_PLUGIN_BUNDLE_DIR "/System/Library/KerberosPlugins/KerberosFrameworkPlugins"
|
||||
#define KDB5_PLUGIN_BUNDLE_DIR "/System/Library/KerberosPlugins/KerberosDatabasePlugins"
|
||||
#define KRB5_AUTHDATA_PLUGIN_BUNDLE_DIR "/System/Library/KerberosPlugins/KerberosAuthDataPlugins"
|
||||
#else
|
||||
#define DEFAULT_SECURE_PROFILE_PATH "/etc/krb5.conf:/usr/local/etc/krb5.conf"
|
||||
#define DEFAULT_PROFILE_PATH DEFAULT_SECURE_PROFILE_PATH
|
||||
#endif
|
||||
#endif /* _WINDOWS */
|
||||
|
||||
#ifdef _WIN32
|
||||
#define DEFAULT_PLUGIN_BASE_DIR "%{LIBDIR}\\plugins"
|
||||
#else
|
||||
#define DEFAULT_PLUGIN_BASE_DIR "/usr/local/lib/krb5/plugins"
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64)
|
||||
#define PLUGIN_EXT "64.dll"
|
||||
#elif defined(_WIN32)
|
||||
#define PLUGIN_EXT "32.dll"
|
||||
#else
|
||||
#define PLUGIN_EXT ".so"
|
||||
#endif
|
||||
|
||||
#define KDC_DIR "/usr/local/var/krb5kdc"
|
||||
#define KDC_RUN_DIR "/run/krb5kdc"
|
||||
#define DEFAULT_KDB_FILE KDC_DIR "/principal"
|
||||
#define DEFAULT_KEYFILE_STUB KDC_DIR "/.k5."
|
||||
#define KRB5_DEFAULT_ADMIN_ACL KDC_DIR "/krb5_adm.acl"
|
||||
/* Used by old admin server */
|
||||
#define DEFAULT_ADMIN_ACL KDC_DIR "/kadm_old.acl"
|
||||
|
||||
/* Location of KDC profile */
|
||||
#define DEFAULT_KDC_PROFILE KDC_DIR "/kdc.conf"
|
||||
#define KDC_PROFILE_ENV "KRB5_KDC_PROFILE"
|
||||
|
||||
#if TARGET_OS_MAC
|
||||
#define DEFAULT_KDB_LIB_PATH { KDB5_PLUGIN_BUNDLE_DIR, "/usr/local/lib/krb5/plugins/kdb", NULL }
|
||||
#else
|
||||
#define DEFAULT_KDB_LIB_PATH { "/usr/local/lib/krb5/plugins/kdb", NULL }
|
||||
#endif
|
||||
|
||||
#define DEFAULT_KDC_ENCTYPE ENCTYPE_AES256_CTS_HMAC_SHA1_96
|
||||
#define KDCRCACHE "dfl:krb5kdc_rcache"
|
||||
|
||||
#define KDC_PORTNAME "kerberos" /* for /etc/services or equiv. */
|
||||
|
||||
#define KRB5_DEFAULT_PORT 88
|
||||
|
||||
#define DEFAULT_KPASSWD_PORT 464
|
||||
|
||||
#define DEFAULT_KDC_UDP_PORTLIST "88"
|
||||
#define DEFAULT_KDC_TCP_PORTLIST "88"
|
||||
#define DEFAULT_TCP_LISTEN_BACKLOG 5
|
||||
|
||||
/*
|
||||
* Defaults for the KADM5 admin system.
|
||||
*/
|
||||
#define DEFAULT_KADM5_KEYTAB KDC_DIR "/kadm5.keytab"
|
||||
#define DEFAULT_KADM5_ACL_FILE KDC_DIR "/kadm5.acl"
|
||||
#define DEFAULT_KADM5_PORT 749 /* assigned by IANA */
|
||||
|
||||
#define KRB5_DEFAULT_SUPPORTED_ENCTYPES \
|
||||
"aes256-cts-hmac-sha1-96:normal " \
|
||||
"aes128-cts-hmac-sha1-96:normal"
|
||||
|
||||
#define MAX_DGRAM_SIZE 65536
|
||||
|
||||
#define RCTMPDIR "/var/tmp" /* directory to store replay caches */
|
||||
|
||||
#define KRB5_PATH_TTY "/dev/tty"
|
||||
#define KRB5_PATH_LOGIN "/usr/local/sbin/login.krb5"
|
||||
#define KRB5_PATH_RLOGIN "/usr/local/bin/rlogin"
|
||||
|
||||
#define KRB5_ENV_CCNAME "KRB5CCNAME"
|
||||
|
||||
/*
|
||||
* krb5 replica support follows
|
||||
*/
|
||||
|
||||
#define KPROP_DEFAULT_FILE KDC_DIR "/replica_datatrans"
|
||||
#define KPROPD_DEFAULT_FILE KDC_DIR "/from_master"
|
||||
#define KPROPD_DEFAULT_KDB5_UTIL "/usr/local/sbin/kdb5_util"
|
||||
#define KPROPD_DEFAULT_KPROP "/usr/local/sbin/kprop"
|
||||
#define KPROPD_DEFAULT_KRB_DB DEFAULT_KDB_FILE
|
||||
#define KPROPD_ACL_FILE KDC_DIR "/kpropd.acl"
|
||||
|
||||
/*
|
||||
* GSS mechglue
|
||||
*/
|
||||
#define MECH_CONF "/usr/local/etc/gss/mech"
|
||||
#define MECH_LIB_PREFIX "/usr/local/lib/gss/"
|
||||
|
||||
#endif /* KRB5_OSCONF__ */
|
|
@ -0,0 +1,2 @@
|
|||
#include "util/profile/profile.hin"
|
||||
#include "util/profile/prof_err.h"
|
|
@ -1,35 +1,40 @@
|
|||
option (ENABLE_CPUID "Enable libcpuid library (only internal)" ${ENABLE_LIBRARIES})
|
||||
if (NOT ARCH_ARM)
|
||||
option (ENABLE_CPUID "Enable libcpuid library (only internal)" ${ENABLE_LIBRARIES})
|
||||
endif()
|
||||
|
||||
if (ARCH_ARM)
|
||||
if (ARCH_ARM AND ENABLE_CPUID)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "cpuid is not supported on ARM")
|
||||
set (ENABLE_CPUID 0)
|
||||
endif ()
|
||||
|
||||
if (ENABLE_CPUID)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcpuid)
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/libcpuid/asm-bits.c
|
||||
${LIBRARY_DIR}/libcpuid/cpuid_main.c
|
||||
${LIBRARY_DIR}/libcpuid/libcpuid_util.c
|
||||
${LIBRARY_DIR}/libcpuid/msrdriver.c
|
||||
${LIBRARY_DIR}/libcpuid/rdmsr.c
|
||||
${LIBRARY_DIR}/libcpuid/rdtsc.c
|
||||
${LIBRARY_DIR}/libcpuid/recog_amd.c
|
||||
${LIBRARY_DIR}/libcpuid/recog_intel.c
|
||||
)
|
||||
|
||||
add_library (cpuid ${SRCS})
|
||||
|
||||
target_include_directories (cpuid SYSTEM PUBLIC ${LIBRARY_DIR})
|
||||
target_compile_definitions (cpuid PUBLIC USE_CPUID=1)
|
||||
target_compile_definitions (cpuid PRIVATE VERSION="v0.4.1")
|
||||
if (COMPILER_CLANG)
|
||||
target_compile_options (cpuid PRIVATE -Wno-reserved-id-macro)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using cpuid")
|
||||
else ()
|
||||
if (NOT ENABLE_CPUID)
|
||||
add_library (cpuid INTERFACE)
|
||||
|
||||
target_compile_definitions (cpuid INTERFACE USE_CPUID=0)
|
||||
|
||||
return()
|
||||
endif()
|
||||
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/libcpuid")
|
||||
|
||||
set (SRCS
|
||||
"${LIBRARY_DIR}/libcpuid/asm-bits.c"
|
||||
"${LIBRARY_DIR}/libcpuid/cpuid_main.c"
|
||||
"${LIBRARY_DIR}/libcpuid/libcpuid_util.c"
|
||||
"${LIBRARY_DIR}/libcpuid/msrdriver.c"
|
||||
"${LIBRARY_DIR}/libcpuid/rdmsr.c"
|
||||
"${LIBRARY_DIR}/libcpuid/rdtsc.c"
|
||||
"${LIBRARY_DIR}/libcpuid/recog_amd.c"
|
||||
"${LIBRARY_DIR}/libcpuid/recog_intel.c"
|
||||
)
|
||||
|
||||
add_library (cpuid ${SRCS})
|
||||
|
||||
target_include_directories (cpuid SYSTEM PUBLIC "${LIBRARY_DIR}")
|
||||
target_compile_definitions (cpuid PUBLIC USE_CPUID=1)
|
||||
target_compile_definitions (cpuid PRIVATE VERSION="v0.4.1")
|
||||
if (COMPILER_CLANG)
|
||||
target_compile_options (cpuid PRIVATE -Wno-reserved-id-macro)
|
||||
endif ()
|
||||
|
||||
message (STATUS "Using cpuid")
|
||||
|
|
|
@ -1,4 +1,14 @@
|
|||
if (NOT USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
if (ENABLE_PROTOBUF AND NOT USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
option(PROTOBUF_OLD_ABI_COMPAT "Set to ON for compatiability with external protobuf which was compiled old C++ ABI" OFF)
|
||||
endif()
|
||||
|
||||
if (PROTOBUF_OLD_ABI_COMPAT)
|
||||
if (NOT ENABLE_PROTOBUF OR USE_INTERNAL_PROTOBUF_LIBRARY)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "PROTOBUF_OLD_ABI_COMPAT option is ignored")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT USE_INTERNAL_PROTOBUF_LIBRARY AND PROTOBUF_OLD_ABI_COMPAT)
|
||||
# compatiable with protobuf which was compiled old C++ ABI
|
||||
set(CMAKE_CXX_FLAGS "-D_GLIBCXX_USE_CXX11_ABI=0")
|
||||
set(CMAKE_C_FLAGS "")
|
||||
|
@ -7,7 +17,7 @@ if (NOT USE_INTERNAL_PROTOBUF_LIBRARY)
|
|||
endif ()
|
||||
endif()
|
||||
|
||||
SET(WITH_KERBEROS false)
|
||||
set(WITH_KERBEROS false)
|
||||
# project and source dir
|
||||
set(HDFS3_ROOT_DIR ${ClickHouse_SOURCE_DIR}/contrib/libhdfs3)
|
||||
set(HDFS3_SOURCE_DIR ${HDFS3_ROOT_DIR}/src)
|
||||
|
@ -206,7 +216,7 @@ target_link_libraries(hdfs3 PRIVATE ${LIBGSASL_LIBRARY})
|
|||
if (WITH_KERBEROS)
|
||||
target_link_libraries(hdfs3 PRIVATE ${KERBEROS_LIBRARIES})
|
||||
endif()
|
||||
target_link_libraries(hdfs3 PRIVATE ${LIBXML2_LIBRARY})
|
||||
target_link_libraries(hdfs3 PRIVATE ${LIBXML2_LIBRARIES})
|
||||
|
||||
# inherit from parent cmake
|
||||
target_include_directories(hdfs3 PRIVATE ${Protobuf_INCLUDE_DIR})
|
||||
|
|
|
@ -6,7 +6,7 @@ set(SRCS
|
|||
# ${RDKAFKA_SOURCE_DIR}/lz4.c
|
||||
# ${RDKAFKA_SOURCE_DIR}/lz4frame.c
|
||||
# ${RDKAFKA_SOURCE_DIR}/lz4hc.c
|
||||
# ${RDKAFKA_SOURCE_DIR}/rdxxhash.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdxxhash.c
|
||||
# ${RDKAFKA_SOURCE_DIR}/regexp.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdaddr.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdavl.c
|
||||
|
@ -49,7 +49,6 @@ set(SRCS
|
|||
${RDKAFKA_SOURCE_DIR}/rdkafka_request.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_roundrobin_assignor.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl.c
|
||||
# ${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_cyrus.c # needed to support Kerberos, requires cyrus-sasl
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_oauthbearer.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_plain.c
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_scram.c
|
||||
|
@ -77,12 +76,34 @@ set(SRCS
|
|||
${RDKAFKA_SOURCE_DIR}/rdgz.c
|
||||
)
|
||||
|
||||
if(${ENABLE_CYRUS_SASL})
|
||||
message (STATUS "librdkafka with SASL support")
|
||||
set(SRCS
|
||||
${SRCS}
|
||||
${RDKAFKA_SOURCE_DIR}/rdkafka_sasl_cyrus.c # needed to support Kerberos, requires cyrus-sasl
|
||||
)
|
||||
endif()
|
||||
|
||||
add_library(rdkafka ${SRCS})
|
||||
target_compile_options(rdkafka PRIVATE -fno-sanitize=undefined)
|
||||
target_include_directories(rdkafka SYSTEM PUBLIC include)
|
||||
# target_include_directories(rdkafka SYSTEM PUBLIC include)
|
||||
target_include_directories(rdkafka SYSTEM PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include) # for "librdkafka/rdkafka.h"
|
||||
target_include_directories(rdkafka SYSTEM PUBLIC ${RDKAFKA_SOURCE_DIR}) # Because weird logic with "include_next" is used.
|
||||
target_include_directories(rdkafka SYSTEM PUBLIC ${CMAKE_CURRENT_BINARY_DIR}/auxdir) # for "../config.h"
|
||||
target_include_directories(rdkafka SYSTEM PRIVATE ${ZSTD_INCLUDE_DIR}/common) # Because wrong path to "zstd_errors.h" is used.
|
||||
target_link_libraries(rdkafka PRIVATE lz4 ${ZLIB_LIBRARIES} ${ZSTD_LIBRARY} ${LIBGSASL_LIBRARY})
|
||||
target_link_libraries(rdkafka PRIVATE lz4 ${ZLIB_LIBRARIES} ${ZSTD_LIBRARY})
|
||||
if(OPENSSL_SSL_LIBRARY AND OPENSSL_CRYPTO_LIBRARY)
|
||||
target_link_libraries(rdkafka PRIVATE ${OPENSSL_SSL_LIBRARY} ${OPENSSL_CRYPTO_LIBRARY})
|
||||
endif()
|
||||
if(${ENABLE_CYRUS_SASL})
|
||||
target_link_libraries(rdkafka PRIVATE ${CYRUS_SASL_LIBRARY})
|
||||
set(WITH_SASL_CYRUS 1)
|
||||
endif()
|
||||
|
||||
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/auxdir)
|
||||
|
||||
configure_file(
|
||||
"${CMAKE_CURRENT_SOURCE_DIR}/config.h.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/config.h"
|
||||
IMMEDIATE @ONLY
|
||||
)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Automatically generated by ./configure
|
||||
// Originally generated by ./configure
|
||||
#ifndef _CONFIG_H_
|
||||
#define _CONFIG_H_
|
||||
#define ARCH "x86_64"
|
||||
|
@ -65,6 +65,7 @@
|
|||
#define WITH_SASL_SCRAM 1
|
||||
// WITH_SASL_OAUTHBEARER
|
||||
#define WITH_SASL_OAUTHBEARER 1
|
||||
#cmakedefine WITH_SASL_CYRUS 1
|
||||
// crc32chw
|
||||
#if !defined(__PPC__)
|
||||
#define WITH_CRC32C_HW 1
|
|
@ -1,13 +1,30 @@
|
|||
option (USE_INTERNAL_LZ4_LIBRARY "Use internal lz4 library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (USE_INTERNAL_LZ4_LIBRARY)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/lz4)
|
||||
if (NOT USE_INTERNAL_LZ4_LIBRARY)
|
||||
find_library (LIBRARY_LZ4 lz4)
|
||||
find_path (INCLUDE_LZ4 lz4.h)
|
||||
|
||||
if (LIBRARY_LZ4 AND INCLUDE_LZ4)
|
||||
set(EXTERNAL_LZ4_LIBRARY_FOUND 1)
|
||||
add_library (lz4 UNKNOWN IMPORTED)
|
||||
set_property (TARGET lz4 PROPERTY IMPORTED_LOCATION ${LIBRARY_LZ4})
|
||||
set_property (TARGET lz4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_LZ4})
|
||||
set_property (TARGET lz4 APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USE_XXHASH=0)
|
||||
else()
|
||||
set(EXTERNAL_LZ4_LIBRARY_FOUND 0)
|
||||
message (${RECONFIGURE_MESSAGE_LEVEL} "Can't find system lz4")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT EXTERNAL_LZ4_LIBRARY_FOUND)
|
||||
set (USE_INTERNAL_LZ4_LIBRARY 1)
|
||||
set (LIBRARY_DIR "${ClickHouse_SOURCE_DIR}/contrib/lz4")
|
||||
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/lib/lz4.c
|
||||
${LIBRARY_DIR}/lib/lz4hc.c
|
||||
${LIBRARY_DIR}/lib/lz4frame.c
|
||||
${LIBRARY_DIR}/lib/xxhash.c
|
||||
"${LIBRARY_DIR}/lib/lz4.c"
|
||||
"${LIBRARY_DIR}/lib/lz4hc.c"
|
||||
"${LIBRARY_DIR}/lib/lz4frame.c"
|
||||
"${LIBRARY_DIR}/lib/xxhash.c"
|
||||
)
|
||||
|
||||
add_library (lz4 ${SRCS})
|
||||
|
@ -17,12 +34,4 @@ if (USE_INTERNAL_LZ4_LIBRARY)
|
|||
target_compile_options (lz4 PRIVATE -fno-sanitize=undefined)
|
||||
endif ()
|
||||
target_include_directories(lz4 PUBLIC ${LIBRARY_DIR}/lib)
|
||||
else ()
|
||||
find_library (LIBRARY_LZ4 lz4)
|
||||
find_path (INCLUDE_LZ4 lz4.h)
|
||||
|
||||
add_library (lz4 UNKNOWN IMPORTED)
|
||||
set_property (TARGET lz4 PROPERTY IMPORTED_LOCATION ${LIBRARY_LZ4})
|
||||
set_property (TARGET lz4 PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${INCLUDE_LZ4})
|
||||
set_property (TARGET lz4 APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS USE_XXHASH=0)
|
||||
endif ()
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 74c93443342f6028fa6402057684733b316aa737
|
||||
Subproject commit 297fc905e166392156f83b96aaa5f44e8a6a35c4
|
|
@ -1,11 +1,3 @@
|
|||
option (USE_INTERNAL_POCO_LIBRARY "Use internal Poco library" ${NOT_UNBUNDLED})
|
||||
|
||||
if (USE_INTERNAL_POCO_LIBRARY)
|
||||
set (LIBRARY_DIR ${ClickHouse_SOURCE_DIR}/contrib/poco)
|
||||
else ()
|
||||
find_path (ROOT_DIR NAMES Foundation/include/Poco/Poco.h include/Poco/Poco.h)
|
||||
endif ()
|
||||
|
||||
add_subdirectory (Crypto)
|
||||
add_subdirectory (Data)
|
||||
add_subdirectory (Data/ODBC)
|
||||
|
|
|
@ -1,4 +1,8 @@
|
|||
if (ENABLE_ODBC)
|
||||
if (NOT TARGET unixodbc)
|
||||
message(FATAL_ERROR "Configuration error: unixodbc is not a target")
|
||||
endif()
|
||||
|
||||
if (USE_INTERNAL_POCO_LIBRARY)
|
||||
set (SRCS
|
||||
${LIBRARY_DIR}/Data/ODBC/src/Binder.cpp
|
||||
|
|
|
@ -222,7 +222,7 @@ if (USE_INTERNAL_POCO_LIBRARY)
|
|||
POCO_OS_FAMILY_UNIX
|
||||
)
|
||||
target_include_directories (_poco_foundation SYSTEM PUBLIC ${LIBRARY_DIR}/Foundation/include)
|
||||
target_link_libraries (_poco_foundation PRIVATE Poco::Foundation::PCRE zlib)
|
||||
target_link_libraries (_poco_foundation PRIVATE Poco::Foundation::PCRE ${ZLIB_LIBRARIES})
|
||||
else ()
|
||||
add_library (Poco::Foundation UNKNOWN IMPORTED GLOBAL)
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue