mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fix running cmake with predefined cache (for development only)
Right now cmake add the following options only if USE_STATIC_LIBRARIES is OFF: - SPLIT_SHARED_LIBRARIES - CLICKHOUSE_SPLIT_BINARY And this breaks the following usage: $ cmake .. $ cat > debug-build-cache.cmake set(USE_STATIC_LIBRARIES OFF CACHE BOOL "") set(SPLIT_SHARED_LIBRARIES ON CACHE BOOL "") set(CLICKHOUSE_SPLIT_BINARY ON CACHE BOOL "") ^D $ cmake -C debug-build-cache.cmake .. CMake Error at CMakeLists.txt:83 (message): Defining SPLIT_SHARED_LIBRARIES=1 without USE_STATIC_LIBRARIES=0 has no effect. Since with this initial cache we have the following: - USE_STATIC_LIBRARIES=OFF (because it was already set) - SPLIT_SHARED_LIBRARIES=ON (was not set before, so new value) - CLICKHOUSE_SPLIT_BINARY (was not set before, also new value) Yes this is not the common usage, but it seems that it is pretty easy to avoid. Signed-off-by: Azat Khuzhin <a.khuzhin@semrush.com>
This commit is contained in:
parent
e0fb03d1b6
commit
30018ce5d3
@ -74,15 +74,10 @@ message (STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}")
|
|||||||
string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
|
string (TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_UC)
|
||||||
|
|
||||||
option(USE_STATIC_LIBRARIES "Disable to use shared libraries" ON)
|
option(USE_STATIC_LIBRARIES "Disable to use shared libraries" ON)
|
||||||
|
# DEVELOPER ONLY.
|
||||||
if (NOT USE_STATIC_LIBRARIES)
|
# Faster linking if turned on.
|
||||||
# DEVELOPER ONLY.
|
option(SPLIT_SHARED_LIBRARIES "Keep all internal libraries as separate .so files" OFF)
|
||||||
# Faster linking if turned on.
|
option(CLICKHOUSE_SPLIT_BINARY "Make several binaries (clickhouse-server, clickhouse-client etc.) instead of one bundled" OFF)
|
||||||
option(SPLIT_SHARED_LIBRARIES "Keep all internal libraries as separate .so files")
|
|
||||||
|
|
||||||
option(CLICKHOUSE_SPLIT_BINARY
|
|
||||||
"Make several binaries (clickhouse-server, clickhouse-client etc.) instead of one bundled")
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
if (USE_STATIC_LIBRARIES AND SPLIT_SHARED_LIBRARIES)
|
||||||
message(FATAL_ERROR "Defining SPLIT_SHARED_LIBRARIES=1 without USE_STATIC_LIBRARIES=0 has no effect.")
|
message(FATAL_ERROR "Defining SPLIT_SHARED_LIBRARIES=1 without USE_STATIC_LIBRARIES=0 has no effect.")
|
||||||
|
Loading…
Reference in New Issue
Block a user