[Lldb-commits] [lldb] r355103 - [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central place
Nico Weber via lldb-commits
lldb-commits at lists.llvm.org
Thu Mar 14 13:45:12 PDT 2019
I tried LLVM_ENABLE_PROJECTS=all today, and it fails with
CMake Error: The following variables are used in this project, but they are
set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake
files:
libedit_INCLUDE_DIRS
used as include directory in directory
/usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp
used as include directory in directory
/usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp
used as include directory in directory
/usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp
libedit_LIBRARIES
linked by target "cmTC_43ea9" in directory
/usr/local/google/home/thakis/src/llvm-build-project/CMakeFiles/CMakeTmp
CMake Error at /usr/share/cmake-3.10/Modules/CheckTypeSize.cmake:114
(try_compile):
Failed to configure test project build system.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/CheckTypeSize.cmake:239
(__check_type_size_impl)
/usr/local/google/home/thakis/src/llvm-project/lldb/cmake/modules/LLDBConfig.cmake:106
(check_type_size)
/usr/local/google/home/thakis/src/llvm-project/lldb/CMakeLists.txt:15
(include)
Is that expected?
On Thu, Feb 28, 2019 at 11:04 AM Pavel Labath via lldb-commits <
lldb-commits at lists.llvm.org> wrote:
> Author: labath
> Date: Thu Feb 28 08:04:54 2019
> New Revision: 355103
>
> URL: http://llvm.org/viewvc/llvm-project?rev=355103&view=rev
> Log:
> [cmake] Move LLDB_DISABLE_LIBEDIT handling code into a central place
>
> This was previously scattered between the main CMakeLists.txt file and
> LLDBGenerateConfig.cmake and LLDBConfig.cmake. This caused the some of
> the code to be executed in incorrect order. Specifically, the check for
> el_winsertstr was done before libedit_LIBRARIES was computed, and so it
> always failed on the first run.
>
> Moving it the two checks to a central place makes sure this doesn't
> happen again and improves the overall readability.
>
> Modified:
> lldb/trunk/CMakeLists.txt
> lldb/trunk/cmake/modules/LLDBConfig.cmake
> lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
>
> Modified: lldb/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=355103&r1=355102&r2=355103&view=diff
>
> ==============================================================================
> --- lldb/trunk/CMakeLists.txt (original)
> +++ lldb/trunk/CMakeLists.txt Thu Feb 28 08:04:54 2019
> @@ -22,12 +22,6 @@ else()
> add_definitions( -DLLDB_CONFIGURATION_RELEASE )
> endif()
>
> -if (LLDB_DISABLE_LIBEDIT)
> - add_definitions( -DLLDB_DISABLE_LIBEDIT )
> -else()
> - find_package(LibEdit REQUIRED)
> -endif()
> -
> if(APPLE)
> add_definitions(-DLLDB_USE_OS_LOG)
> endif()
>
> Modified: lldb/trunk/cmake/modules/LLDBConfig.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBConfig.cmake?rev=355103&r1=355102&r2=355103&view=diff
>
> ==============================================================================
> --- lldb/trunk/cmake/modules/LLDBConfig.cmake (original)
> +++ lldb/trunk/cmake/modules/LLDBConfig.cmake Thu Feb 28 08:04:54 2019
> @@ -1,4 +1,5 @@
> include(CheckCXXSymbolExists)
> +include(CheckTypeSize)
>
> set(LLDB_PROJECT_ROOT ${CMAKE_CURRENT_SOURCE_DIR})
> set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")
> @@ -91,6 +92,29 @@ if (LLDB_DISABLE_CURSES)
> add_definitions( -DLLDB_DISABLE_CURSES )
> endif()
>
> +if (LLDB_DISABLE_LIBEDIT)
> + add_definitions( -DLLDB_DISABLE_LIBEDIT )
> +else()
> + find_package(LibEdit REQUIRED)
> +
> + # Check if we libedit capable of handling wide characters (built with
> + # '--enable-widec').
> + set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES})
> + set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS})
> + check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
> + 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 "")
> + set(LLDB_HAVE_EL_RFUNC_T 0)
> + else()
> + set(LLDB_HAVE_EL_RFUNC_T 1)
> + endif()
> + set(CMAKE_REQUIRED_LIBRARIES)
> + set(CMAKE_REQUIRED_INCLUDES)
> + set(CMAKE_EXTRA_INCLUDE_FILES)
> +endif()
> +
> +
> # On Windows, we can't use the normal FindPythonLibs module that comes
> with CMake,
> # for a number of reasons.
> # 1) Prior to MSVC 2015, it is only possible to embed Python if python
> itself was
>
> Modified: lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake?rev=355103&r1=355102&r2=355103&view=diff
>
> ==============================================================================
> --- lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake (original)
> +++ lldb/trunk/cmake/modules/LLDBGenerateConfig.cmake Thu Feb 28 08:04:54
> 2019
> @@ -4,7 +4,6 @@ include(CheckSymbolExists)
> include(CheckIncludeFile)
> include(CheckIncludeFiles)
> include(CheckLibraryExists)
> -include(CheckTypeSize)
>
> set(CMAKE_REQUIRED_DEFINITIONS -D_GNU_SOURCE)
> check_symbol_exists(ppoll poll.h HAVE_PPOLL)
> @@ -28,24 +27,6 @@ if(NOT UNIX)
> set(LLDB_DISABLE_POSIX 1)
> endif()
>
> -if (NOT LLDB_DISABLE_LIBEDIT)
> - # Check if we libedit capable of handling wide characters (built with
> - # '--enable-widec').
> - set(CMAKE_REQUIRED_LIBRARIES ${libedit_LIBRARIES})
> - set(CMAKE_REQUIRED_INCLUDES ${libedit_INCLUDE_DIRS})
> - check_symbol_exists(el_winsertstr histedit.h LLDB_EDITLINE_USE_WCHAR)
> - 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 "")
> - set(LLDB_HAVE_EL_RFUNC_T 0)
> - else()
> - set(LLDB_HAVE_EL_RFUNC_T 1)
> - endif()
> - set(CMAKE_REQUIRED_LIBRARIES)
> - set(CMAKE_REQUIRED_INCLUDES)
> - set(CMAKE_EXTRA_INCLUDE_FILES)
> -endif()
> -
> if(NOT LLDB_CONFIG_HEADER_INPUT)
> set(LLDB_CONFIG_HEADER_INPUT
> ${LLDB_INCLUDE_ROOT}/lldb/Host/Config.h.cmake)
> endif()
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20190314/d6bd602e/attachment.html>
More information about the lldb-commits
mailing list