[DAGCombiner][RISCV] Preserve disjoint flag in folding (shl (or x, c1), c2) -> (or...
[llvm-project.git] / lldb / bindings / CMakeLists.txt
blobb44ed59aa662b2e30a5227c0e782fef4ce3f7af1
1 file(GLOB SWIG_INTERFACES interface/*.i)
2 file(GLOB_RECURSE SWIG_SOURCES *.swig)
3 file(GLOB SWIG_HEADERS
4   ${LLDB_SOURCE_DIR}/include/lldb/API/*.h
5   ${LLDB_SOURCE_DIR}/include/lldb/*.h
7 file(GLOB SWIG_PRIVATE_HEADERS
8   ${LLDB_SOURCE_DIR}/include/lldb/lldb-private*.h
10 foreach(private_header ${SWIG_PRIVATE_HEADERS})
11   list(REMOVE_ITEM SWIG_HEADERS ${private_header})
12 endforeach()
14 if(LLDB_BUILD_FRAMEWORK)
15   set(framework_arg --framework --target-platform Darwin)
16 endif()
18 if(APPLE)
19   set(DARWIN_EXTRAS "-D__APPLE__")
20 else()
21   set(DARWIN_EXTRAS "")
22 endif()
24 set(SWIG_COMMON_FLAGS
25   -c++
26   -w361,362 # Ignore warnings about ignored operator overloads
27   -features autodoc
28   -I${LLDB_SOURCE_DIR}/include
29   -I${CMAKE_CURRENT_SOURCE_DIR}
30   ${DARWIN_EXTRAS}
33 function(create_relative_symlink swig_target dest_file output_dir output_name)
34   get_filename_component(dest_file ${dest_file} ABSOLUTE)
35   get_filename_component(output_dir ${output_dir} ABSOLUTE)
36   file(RELATIVE_PATH rel_dest_file ${output_dir} ${dest_file})
37   if(CMAKE_HOST_UNIX)
38     set(LLVM_LINK_OR_COPY create_symlink)
39   else()
40     set(LLVM_LINK_OR_COPY copy)
41   endif()
42   add_custom_command(TARGET ${swig_target} POST_BUILD VERBATIM
43     COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} ${rel_dest_file} ${output_name}
44     WORKING_DIRECTORY ${output_dir})
45 endfunction()
47 if (LLDB_ENABLE_PYTHON)
48   add_subdirectory(python)
49 endif()
51 if (LLDB_ENABLE_LUA)
52   add_subdirectory(lua)
53 endif()