Skip to content

Commit

Permalink
Add initial CMake glue for the NetBSD platform
Browse files Browse the repository at this point in the history
Summary:
These changes aren't everything what is needed for the CMake target, but it's significantly approaching it.

These changes shouldn't effect the build process on other platforms.

Patch by Kamil Rytarowski, thanks!

Reviewers: joerg, brucem

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D13711

llvm-svn: 251164
  • Loading branch information
waywardmonkeys committed Oct 24, 2015
1 parent 00d913b commit 64f74da
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lldb/source/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ include_directories(
)
endif ()

if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
include_directories(
Plugins/Process/POSIX
)
endif ()


set(lldbBase_SOURCES
lldb.cpp
)
Expand Down Expand Up @@ -83,4 +90,3 @@ if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
endif ()
# FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only
# revision parsing solution in tools/clang/lib/Basic/CMakelists.txt.

13 changes: 13 additions & 0 deletions lldb/source/Host/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,22 @@ else()
linux/ThisThread.cpp
)
endif()

elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_host_subdirectory(freebsd
freebsd/Host.cpp
freebsd/HostInfoFreeBSD.cpp
freebsd/HostThreadFreeBSD.cpp
freebsd/ThisThread.cpp
)

elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
add_host_subdirectory(netbsd
netbsd/Host.cpp
netbsd/HostInfoNetBSD.cpp
netbsd/HostThreadNetBSD.cpp
netbsd/ThisThread.cpp
)
endif()
endif()

Expand All @@ -162,3 +171,7 @@ if (${get_python_libdir})
endif()

add_lldb_library(lldbHost ${HOST_SOURCES})

if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
target_link_libraries(lldbHost kvm)
endif ()
2 changes: 2 additions & 0 deletions lldb/source/Plugins/Platform/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
add_subdirectory(Linux)
#elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_subdirectory(FreeBSD)
#elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
add_subdirectory(NetBSD)
#elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
add_subdirectory(MacOSX)
#elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
Expand Down
3 changes: 3 additions & 0 deletions lldb/source/Plugins/Platform/NetBSD/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
add_lldb_library(lldbPluginPlatformNetBSD
PlatformNetBSD.cpp
)
2 changes: 2 additions & 0 deletions lldb/source/Plugins/Process/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
add_subdirectory(FreeBSD)
add_subdirectory(POSIX)
elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
add_subdirectory(POSIX)
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
add_subdirectory(Windows/Live)
add_subdirectory(Windows/MiniDump)
Expand Down
7 changes: 7 additions & 0 deletions lldb/tools/lldb-server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@ include_directories(
)
endif ()

if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
include_directories(
../../../../llvm/include
../../source/Plugins/Process/POSIX
)
endif ()

include_directories(../../source)

include(../../cmake/LLDBDependencies.cmake)
Expand Down

0 comments on commit 64f74da

Please sign in to comment.