fix compilation (std::variant with narrowing) with system libcxx

This commit is contained in:
Konstantin Podshumok 2019-12-11 18:33:14 +03:00 committed by GitHub
parent 08d59890ae
commit 7635cf93bd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -245,6 +245,13 @@ set_source_files_properties(
src/Common/SymbolIndex.cpp
PROPERTIES COMPILE_FLAGS "-O3 ${WITHOUT_COVERAGE}")
# allow construction of std::variant<unsigned ...>(1) for Dwarf
if (USE_LIBCXX AND NOT USE_INTERNAL_LIBCXX_LIBRARY)
set_source_files_properties(src/Common/Dwarf.cpp PROPERTIES COMPILE_DEFINITIONS
"_LIBCPP_ENABLE_NARROWING_CONVERSIONS_IN_VARIANT=1")
endif ()
target_link_libraries (clickhouse_common_io
PUBLIC
common