Merge 'fky@cnch-dev@build@compile-option-11' into 'cnch-dev'

build(clickhousech@m-4968916875): fix compile compatibility for 11

See merge request: !24169
This commit is contained in:
fredwang 2024-10-07 07:01:01 +00:00
parent 61b45785f7
commit 115c0dea82
3 changed files with 9 additions and 3 deletions

View File

@ -77,7 +77,9 @@ if (COMPILER_CLANG)
no_warning(nested-anon-types)
no_warning(packed)
no_warning(padded)
no_warning(return-std-move-in-c++11) # clang 7+
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 15)
no_warning(return-std-move-in-c++11) # clang 7+
endif()
no_warning(shift-sign-overflow)
no_warning(sign-conversion)
no_warning(switch-enum)

View File

@ -408,7 +408,11 @@ endif ()
add_subdirectory(fast_float)
add_compile_options(-Wno-unused-but-set-variable)
# Check Clang version and add -Wno-unused-but-set-variable if Clang version is 15 or higher
if(${CMAKE_CXX_COMPILER_VERSION} VERSION_GREATER_EQUAL 15)
add_compile_options(-Wno-unused-but-set-variable)
endif()
add_subdirectory(incubator-brpc)
if(OPENSSL_INCLUDE_DIR)
target_include_directories(brpc-static BEFORE PRIVATE ${OPENSSL_INCLUDE_DIR})

View File

@ -9,7 +9,7 @@ void ManifestEntry::addManifest(UInt64 manifest_id, DataModelPartPtrVector && pa
std::unique_lock lock(mutex);
if (!manifest_map.contains(manifest_id))
{
manifest_map.emplace(manifest_id, std::make_pair(move(parts), move(bitmaps)));
manifest_map.emplace(manifest_id, std::make_pair(std::move(parts), std::move(bitmaps)));
total_manifest_data_size += parts.size() + bitmaps.size();
}
}