2019-07-08 23:33:32 +00:00
|
|
|
set(LIBCXX_SOURCE_DIR ${ClickHouse_SOURCE_DIR}/contrib/libcxx)
|
|
|
|
|
|
|
|
set(SRCS
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/optional.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/variant.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/chrono.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/thread.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/experimental/memory_resource.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/iostream.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/strstream.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/ios.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/future.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/shared_mutex.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/condition_variable.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/hash.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/string.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/debug.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/stdexcept.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/utility.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/any.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/exception.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/memory.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/new.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/valarray.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/vector.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/algorithm.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/functional.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/regex.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/bind.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/mutex.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/charconv.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/typeinfo.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/locale.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/filesystem/operations.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/filesystem/int128_builtins.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/filesystem/directory_iterator.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/system_error.cpp
|
|
|
|
${LIBCXX_SOURCE_DIR}/src/random.cpp
|
|
|
|
)
|
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
add_library(cxx ${SRCS})
|
2019-07-08 23:33:32 +00:00
|
|
|
|
2019-08-30 17:40:27 +00:00
|
|
|
target_include_directories(cxx SYSTEM BEFORE PUBLIC $<BUILD_INTERFACE:${LIBCXX_SOURCE_DIR}/include>)
|
2019-08-28 20:49:37 +00:00
|
|
|
target_compile_definitions(cxx PRIVATE -D_LIBCPP_BUILDING_LIBRARY -DLIBCXX_BUILDING_LIBCXXABI)
|
2019-09-15 15:20:31 +00:00
|
|
|
|
2019-08-29 11:09:01 +00:00
|
|
|
target_compile_options(cxx PUBLIC -nostdinc++ -Wno-reserved-id-macro)
|
2019-11-02 08:46:35 +00:00
|
|
|
if (OS_DARWIN AND (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 9) AND (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 11))
|
2019-09-15 15:20:31 +00:00
|
|
|
target_compile_options(cxx PUBLIC -Wno-ctad-maybe-unsupported)
|
|
|
|
endif ()
|
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
target_link_libraries(cxx PUBLIC cxxabi)
|
2019-07-08 23:33:32 +00:00
|
|
|
|
2019-08-28 20:49:37 +00:00
|
|
|
install(
|
|
|
|
TARGETS cxx
|
|
|
|
EXPORT global
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
RUNTIME DESTINATION lib
|
2019-08-29 13:38:18 +00:00
|
|
|
LIBRARY DESTINATION lib
|
2019-08-28 20:49:37 +00:00
|
|
|
)
|