krytarowski created this revision.
krytarowski added reviewers: clayborg, emaste.
krytarowski added subscribers: lldb-commits, joerg, brucem.
krytarowski set the repository for this revision to rL LLVM.
This enables build on NetBSD-7.0. It would be nice to have a fall-back for
externally provided ncurses via pkgsrc, but it's left after the scheduled drop
of the autoconf/gmake build system. For not it's not worth the effort.
Repository:
rL LLVM
http://reviews.llvm.org/D14740
Files:
cmake/modules/LLDBConfig.cmake
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -2,6 +2,8 @@
set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")
set(LLDB_INCLUDE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include")
+include(CheckIncludeFiles)
+
set(LLDB_LINKER_SUPPORTS_GROUPS OFF)
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES
"Darwin")
# The Darwin linker doesn't understand --start-group/--end-group.
@@ -42,6 +44,23 @@
add_definitions( -DHAVE_ROUND )
endif()
+if (NOT LLDB_DISABLE_CURSES)
+ find_package(Curses)
+
+ find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel
library")
+ check_include_files(panel.h HAVE_PANEL_H)
+ if (NOT CURSES_FOUND OR NOT CURSES_PANEL_LIBRARY OR NOT HAVE_PANEL_H)
+ message("-- Unable to find pair curses and libpanel")
+ set(LLDB_DISABLE_CURSES 1)
+ else ()
+ # Add panels to the library path
+ set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
+
+ list(APPEND system_libs ${CURSES_LIBRARIES})
+ include_directories(${CURSES_INCLUDE_DIR})
+ endif ()
+endif ()
+
if (LLDB_DISABLE_CURSES)
add_definitions( -DLLDB_DISABLE_CURSES )
endif()
@@ -395,18 +414,3 @@
else()
set(LLDB_CAN_USE_DEBUGSERVER 0)
endif()
-
-if (NOT LLDB_DISABLE_CURSES)
- find_package(Curses REQUIRED)
-
- find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel
library")
- if (NOT CURSES_PANEL_LIBRARY)
- message(FATAL_ERROR "A required curses' panel library not found.")
- endif ()
-
- # Add panels to the library path
- set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
-
- list(APPEND system_libs ${CURSES_LIBRARIES})
- include_directories(${CURSES_INCLUDE_DIR})
-endif ()
Index: cmake/modules/LLDBConfig.cmake
===================================================================
--- cmake/modules/LLDBConfig.cmake
+++ cmake/modules/LLDBConfig.cmake
@@ -2,6 +2,8 @@
set(LLDB_SOURCE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/source")
set(LLDB_INCLUDE_ROOT "${CMAKE_CURRENT_SOURCE_DIR}/include")
+include(CheckIncludeFiles)
+
set(LLDB_LINKER_SUPPORTS_GROUPS OFF)
if (LLVM_COMPILER_IS_GCC_COMPATIBLE AND NOT "${CMAKE_SYSTEM_NAME}" MATCHES "Darwin")
# The Darwin linker doesn't understand --start-group/--end-group.
@@ -42,6 +44,23 @@
add_definitions( -DHAVE_ROUND )
endif()
+if (NOT LLDB_DISABLE_CURSES)
+ find_package(Curses)
+
+ find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel library")
+ check_include_files(panel.h HAVE_PANEL_H)
+ if (NOT CURSES_FOUND OR NOT CURSES_PANEL_LIBRARY OR NOT HAVE_PANEL_H)
+ message("-- Unable to find pair curses and libpanel")
+ set(LLDB_DISABLE_CURSES 1)
+ else ()
+ # Add panels to the library path
+ set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
+
+ list(APPEND system_libs ${CURSES_LIBRARIES})
+ include_directories(${CURSES_INCLUDE_DIR})
+ endif ()
+endif ()
+
if (LLDB_DISABLE_CURSES)
add_definitions( -DLLDB_DISABLE_CURSES )
endif()
@@ -395,18 +414,3 @@
else()
set(LLDB_CAN_USE_DEBUGSERVER 0)
endif()
-
-if (NOT LLDB_DISABLE_CURSES)
- find_package(Curses REQUIRED)
-
- find_library(CURSES_PANEL_LIBRARY NAMES panel DOC "The curses panel library")
- if (NOT CURSES_PANEL_LIBRARY)
- message(FATAL_ERROR "A required curses' panel library not found.")
- endif ()
-
- # Add panels to the library path
- set (CURSES_LIBRARIES ${CURSES_LIBRARIES} ${CURSES_PANEL_LIBRARY})
-
- list(APPEND system_libs ${CURSES_LIBRARIES})
- include_directories(${CURSES_INCLUDE_DIR})
-endif ()
_______________________________________________
lldb-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits