From 7832765112af58f5777c22c9b44832a9df44d0e3 Mon Sep 17 00:00:00 2001 From: David Chisnall Date: Tue, 26 Dec 2017 17:32:50 +0000 Subject: [PATCH] Improve detection of libsupc++ --- CMake/typeinfo_test.cc | 5 +---- CMakeLists.txt | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/CMake/typeinfo_test.cc b/CMake/typeinfo_test.cc index e11629a..74802f9 100644 --- a/CMake/typeinfo_test.cc +++ b/CMake/typeinfo_test.cc @@ -21,7 +21,6 @@ namespace std bool operator==(const type_info &) const; bool operator!=(const type_info &) const; bool before(const type_info &) const; - type_info(); private: type_info(const type_info& rhs); type_info& operator= (const type_info& rhs); @@ -44,14 +43,12 @@ namespace std class type_info2 : public std::type_info { public: + type_info2() : type_info("foo") {} virtual bool __is_pointer_p() const; virtual bool __is_function_p() const { return true; } virtual bool __do_catch(const type_info *thrown_type, void **thrown_object, unsigned outer) const { return true; } - virtual bool __do_upcast( - const __class_type_info *target, - void **thrown_object) const { return true; } }; bool type_info2::__is_pointer_p() const { return true; } diff --git a/CMakeLists.txt b/CMakeLists.txt index 2d0d463..8d4255e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,7 +231,7 @@ if (ENABLE_OBJCXX) target_link_libraries(objc ${CXX_RUNTIME}) endif() set(libobjc_CXX_SRCS ${libobjcxx_CXX_SRCS}) - target_sources(objc ${libobjcxx_CXX_SRCS}) + target_sources(objc PRIVATE ${libobjcxx_CXX_SRCS}) endif()