summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Stellard <tstellar@redhat.com>2019-10-11 04:56:54 +0000
committerTom Stellard <tstellar@redhat.com>2019-10-11 04:56:54 +0000
commit51b3c5c35a5851bf678d3e6e08c9b778ec7b5dc3 (patch)
tree17dc570ed734d0cc240942c2571e8edeab045544
parent29fa98dbfeff20d845f1c025a1c3fd817e12f2f5 (diff)
[lldb][cmake] Fix build with GCC 4.8 and wchar-enabled libeditrelease_90
Fixes PR43229. Patch By: Joseph Tremoulet git-svn-id: https://llvm.org/svn/llvm-project/lldb/branches/release_90@374511 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--cmake/modules/LLDBConfig.cmake9
1 files changed, 7 insertions, 2 deletions
diff --git a/cmake/modules/LLDBConfig.cmake b/cmake/modules/LLDBConfig.cmake
index 0dca55760..e1a133709 100644
--- a/cmake/modules/LLDBConfig.cmake
+++ b/cmake/modules/LLDBConfig.cmake
@@ -1,3 +1,4 @@
+include(CheckIncludeFileCXX)
include(CheckCXXSymbolExists)
include(CheckTypeSize)
@@ -94,10 +95,14 @@ else()
find_package(LibEdit REQUIRED)
# Check if we libedit capable of handling wide characters (built with
- # '--enable-widec').
+ # '--enable-widec'), and have the <codecvt> standard library we use to
+ # process them.
set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES})
set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS})
- check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
+ check_symbol_exists(el_winsertstr histedit.h HAVE_WIDEC_LIBEDIT)
+ if (HAVE_WIDEC_LIBEDIT)
+ check_include_file_cxx(codecvt LLDB_EDITLINE_USE_WCHAR)
+ endif()
set(CMAKE_EXTRA_INCLUDE_FILES histedit.h)
check_type_size(el_rfunc_t LLDB_EL_RFUNC_T_SIZE)
if (LLDB_EL_RFUNC_T_SIZE STREQUAL "")