ClickHouse / clickhouse-cpp

C++ client library for ClickHouse
Apache License 2.0
305 stars 159 forks source link

Maybe add prefix for all defined cmake build options? #358

Closed german3w1 closed 9 months ago

german3w1 commented 9 months ago

Hi, @Enmk!. I noticed that all the build options in the root CMakeLists.txt do not have any prefixes to ensure that they do not overlap with other project options when included as a dependency. How about sacrificing a little backwards compatibility and adding the prefix CLICKHOUSE_CPP_ to the name of each option (in the YAML_CPP library its authors went exactly this way, for example)

Example for clickhouse: BUILD_TESTS -> CLICKHOUSE_CPP_BUILD_TESTS

I'll do this if you find the idea is worth

Enmk commented 9 months ago

Sure, let's do it! I think that this might be a good idea for a 3.0 release.

Enmk commented 9 months ago

Fixed in https://github.com/ClickHouse/clickhouse-cpp/pull/360