2015-03-18 06:51:21 +08:00
|
|
|
add_custom_target(LLDBUnitTests)
|
|
|
|
set_target_properties(LLDBUnitTests PROPERTIES FOLDER "LLDB tests")
|
|
|
|
|
|
|
|
include_directories(${LLDB_SOURCE_ROOT})
|
|
|
|
|
|
|
|
set(LLDB_GTEST_COMMON_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR}/gtest_common.h)
|
|
|
|
if (MSVC)
|
|
|
|
list(APPEND LLVM_COMPILE_FLAGS /FI ${LLDB_GTEST_COMMON_INCLUDE})
|
|
|
|
else ()
|
|
|
|
list(APPEND LLVM_COMPILE_FLAGS -include ${LLDB_GTEST_COMMON_INCLUDE})
|
|
|
|
endif ()
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
include(${LLDB_PROJECT_ROOT}/cmake/LLDBDependencies.cmake)
|
|
|
|
|
2015-03-18 06:51:21 +08:00
|
|
|
function(add_lldb_unittest test_name)
|
2015-03-19 00:56:24 +08:00
|
|
|
add_unittest(LLDBUnitTests
|
|
|
|
${test_name}
|
|
|
|
${ARGN}
|
|
|
|
)
|
|
|
|
|
|
|
|
lldb_link_common_libs(${test_name} EXE)
|
2015-04-27 17:26:03 +08:00
|
|
|
target_link_libraries(${test_name} ${CLANG_USED_LIBS} ${LLDB_SYSTEM_LIBS})
|
2015-03-19 00:56:24 +08:00
|
|
|
llvm_config(${test_name} ${LLVM_LINK_COMPONENTS})
|
2015-03-18 06:51:21 +08:00
|
|
|
endfunction()
|
|
|
|
|
2015-10-26 05:42:35 +08:00
|
|
|
add_subdirectory(Editline)
|
2015-11-03 03:30:40 +08:00
|
|
|
add_subdirectory(Expression)
|
2015-03-18 06:51:21 +08:00
|
|
|
add_subdirectory(Host)
|
|
|
|
add_subdirectory(Interpreter)
|
Port native Python-API to 3.x
With this change, liblldb is 95% of the way towards being able
to work under both Python 2.x and Python 3.x. This should
introduce no functional change for Python 2.x, but for Python
3.x there are some important changes. Primarily, these are:
1) PyString doesn't exist in Python 3. Everything is a PyUnicode.
To account for this, PythonString now stores a PyBytes instead
of a PyString. In Python 2, this is equivalent to a PyUnicode,
and in Python 3, we do a conversion from PyUnicode to PyBytes
and store the PyBytes.
2) PyInt doesn't exist in Python 3. Everything is a PyLong. To
account for this, PythonInteger stores a PyLong instead of a
PyInt. In Python 2.x, this requires doing a conversion to
PyLong when creating a PythonInteger from a PyInt. In 3.x,
there is no PyInt anyway, so we can assume everything is a
PyLong.
3) PyFile_FromFile doesn't exist in Python 3. Instead there is a
PyFile_FromFd. This is not addressed in this patch because it
will require quite a large change to plumb fd's all the way
through the system into the ScriptInterpreter. This is the only
remaining piece of the puzzle to get LLDB supporting Python 3.x.
Being able to run the test suite is not addressed in this patch.
After the extension module can compile and you can enter an embedded
3.x interpreter, the test suite will be addressed in a followup.
llvm-svn: 249886
2015-10-10 03:45:41 +08:00
|
|
|
add_subdirectory(ScriptInterpreter)
|
2015-03-18 06:51:21 +08:00
|
|
|
add_subdirectory(Utility)
|