[lldb/CMake] Separate CMake code for Lua and Python (NFC)
authorJonas Devlieghere <jonas@devlieghere.com>
Tue, 11 Aug 2020 15:43:44 +0000 (08:43 -0700)
committerJonas Devlieghere <jonas@devlieghere.com>
Tue, 11 Aug 2020 16:04:18 +0000 (09:04 -0700)
commitc135744b1df394f51b6a08bc562f99a1236e772c
tree99e0efab44f3ee44fd9bf36ce7841ed13179f052
parent0dc4c36d3aa1c1bcae4aa00e7808722ebfd22f6d
[lldb/CMake] Separate CMake code for Lua and Python (NFC)

Separate the CMake logic for Lua and Python to clearly distinguish
between code specific to either scripting language and the code shared
by both.

What this patch does is:

 - Move Python specific code into the bindings/python subdirectory.
 - Move the Lua specific code into the bindings/lua subdirectory.
 - Add the _python suffix to Python specific functions/targets.
 - Fix a dependency issue that would check the binding instead of
   whether the scripting language is enabled.

Note that this patch also changes where the bindings are generated,
which might affect downstream projects that check them in.

Differential revision: https://reviews.llvm.org/D85708
lldb/CMakeLists.txt
lldb/bindings/CMakeLists.txt
lldb/bindings/lua/CMakeLists.txt [new file with mode: 0644]
lldb/bindings/lua/lua.swig [moved from lldb/bindings/lua.swig with 100% similarity]
lldb/bindings/python/CMakeLists.txt [new file with mode: 0644]
lldb/bindings/python/python.swig [moved from lldb/bindings/python.swig with 100% similarity]
lldb/docs/CMakeLists.txt
lldb/source/API/CMakeLists.txt