2021-04-24 19:47:52 +00:00
set ( LIBCXXABI_SOURCE_DIR "${ClickHouse_SOURCE_DIR}/contrib/libcxxabi" )
2019-07-08 23:33:32 +00:00
set ( SRCS
2021-04-24 19:48:44 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / a b o r t _ m e s s a g e . c p p "
2022-02-25 11:33:23 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ a u x _ r u n t i m e . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ d e f a u l t _ h a n d l e r s . c p p "
2021-04-24 19:48:44 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ d e m a n g l e . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ e x c e p t i o n . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ e x c e p t i o n _ s t o r a g e . c p p "
2022-02-25 11:33:23 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ g u a r d . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ h a n d l e r s . c p p "
2022-10-24 07:41:12 +00:00
# "${LIBCXXABI_SOURCE_DIR}/src/cxa_noexception.cpp"
2022-02-25 11:33:23 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ p e r s o n a l i t y . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ t h r e a d _ a t e x i t . c p p "
2021-04-24 19:48:44 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ v e c t o r . c p p "
2022-02-25 11:33:23 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / c x a _ v i r t u a l . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / f a l l b a c k _ m a l l o c . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / p r i v a t e _ t y p e i n f o . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / s t d l i b _ e x c e p t i o n . c p p "
2021-04-24 19:48:44 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / s t d l i b _ n e w _ d e l e t e . c p p "
2022-02-25 11:33:23 +00:00
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / s t d l i b _ s t d e x c e p t . c p p "
" $ { L I B C X X A B I _ S O U R C E _ D I R } / s r c / s t d l i b _ t y p e i n f o . c p p "
2019-07-08 23:33:32 +00:00
)
2019-08-28 20:49:37 +00:00
add_library ( cxxabi ${ SRCS } )
2021-10-17 20:10:01 +00:00
set_target_properties ( cxxabi PROPERTIES FOLDER "contrib/libcxxabi-cmake" )
2019-07-08 23:33:32 +00:00
2020-02-22 19:46:41 +00:00
# Third party library may have substandard code.
2020-02-22 19:49:05 +00:00
target_compile_options ( cxxabi PRIVATE -w )
2020-02-22 19:46:41 +00:00
2019-08-28 20:49:37 +00:00
target_include_directories ( cxxabi SYSTEM BEFORE
P U B L I C $ < B U I L D _ I N T E R F A C E : $ { L I B C X X A B I _ S O U R C E _ D I R } / i n c l u d e >
P R I V A T E $ < B U I L D _ I N T E R F A C E : $ { L I B C X X A B I _ S O U R C E _ D I R } / . . / l i b c x x / i n c l u d e >
2022-02-25 11:33:23 +00:00
P R I V A T E $ < B U I L D _ I N T E R F A C E : $ { L I B C X X A B I _ S O U R C E _ D I R } / . . / l i b c x x / s r c >
2019-08-28 20:49:37 +00:00
)
target_compile_definitions ( cxxabi PRIVATE -D_LIBCPP_BUILDING_LIBRARY )
2019-08-29 10:44:22 +00:00
target_compile_options ( cxxabi PRIVATE -nostdinc++ -fno-sanitize=undefined -Wno-macro-redefined ) # If we don't disable UBSan, infinite recursion happens in dynamic_cast.
2019-08-30 17:40:27 +00:00
target_link_libraries ( cxxabi PUBLIC ${ EXCEPTION_HANDLING_LIBRARY } )
2019-07-08 23:33:32 +00:00
2020-01-02 06:56:53 +00:00
# Enable capturing stack traces for all exceptions.
2020-01-02 16:38:09 +00:00
if ( USE_UNWIND )
target_compile_definitions ( cxxabi PUBLIC -DSTD_EXCEPTION_HAS_STACK_TRACE=1 )
endif ( )
2020-01-02 06:56:53 +00:00
2019-08-28 20:49:37 +00:00
install (
T A R G E T S c x x a b i
E X P O R T g l o b a l
A R C H I V E D E S T I N A T I O N l i b
R U N T I M E D E S T I N A T I O N l i b
2019-08-29 13:38:18 +00:00
L I B R A R Y D E S T I N A T I O N l i b
2019-08-28 20:49:37 +00:00
)