This patch adds test infrastructure to utilize the GNUstep runtime in the LLDB test suite and adds coverage for features that already work on Linux. These seem accidental in parts, but it's a good early baseline. On Windows nothing works yet. Please find the repository for the GNUstep ObjC runtime here: https://github.com/gnustep/libobjc2 GNUstep support is disabled by default. CMake configuration involves two variables: * `LLDB_TEST_OBJC_GNUSTEP=On` enables GNUstep support in the test suite. It requires the libobjc2 shared library and headers to be found. * `LLDB_TEST_OBJC_GNUSTEP=Off` disables GNUstep support in the test suite and resets associated cache values if necessary (default). * `LLDB_TEST_OBJC_GNUSTEP_DIR` allows to pass a custom installation root. Differential Revision: https://reviews.llvm.org/D146058
42 lines
1.1 KiB
CMake
42 lines
1.1 KiB
CMake
#.rst:
|
|
# FindGNUstepObjC
|
|
# ---------------
|
|
#
|
|
# Find the GNUstep libobjc2 shared library.
|
|
|
|
set(gnustep_install_dir "")
|
|
|
|
if (UNIX)
|
|
set(gnustep_lib lib/libobjc.so)
|
|
set(gnustep_header include/objc/runtime.h)
|
|
if (GNUstepObjC_DIR)
|
|
if (EXISTS "${GNUstepObjC_DIR}/${gnustep_lib}" AND
|
|
EXISTS "${GNUstepObjC_DIR}/${gnustep_header}")
|
|
set(gnustep_install_dir ${GNUstepObjC_DIR})
|
|
endif()
|
|
else()
|
|
set(gnustep_install_dir)
|
|
find_path(gnustep_install_dir NAMES lib/libobjc.so include/objc/runtime.h)
|
|
endif()
|
|
if (gnustep_install_dir)
|
|
set(GNUstepObjC_FOUND TRUE)
|
|
endif()
|
|
elseif (WIN32)
|
|
set(gnustep_lib lib/objc.dll)
|
|
set(gnustep_header include/objc/runtime.h)
|
|
if (GNUstepObjC_DIR)
|
|
set(gnustep_install_dir ${GNUstepObjC_DIR})
|
|
else()
|
|
set(gnustep_install_dir "C:/Program Files (x86)/libobjc")
|
|
endif()
|
|
if (EXISTS "${gnustep_install_dir}/${gnustep_lib}" AND
|
|
EXISTS "${gnustep_install_dir}/${gnustep_header}")
|
|
set(GNUstepObjC_FOUND TRUE)
|
|
endif()
|
|
endif()
|
|
|
|
if (GNUstepObjC_FOUND)
|
|
set(GNUstepObjC_DIR ${gnustep_install_dir})
|
|
message(STATUS "Found GNUstep ObjC runtime: ${GNUstepObjC_DIR}/${gnustep_lib}")
|
|
endif()
|