Skip to content

Commit 64f74da

Browse files
committedOct 24, 2015
Add initial CMake glue for the NetBSD platform
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
1 parent 00d913b commit 64f74da

File tree

6 files changed

+34
-1
lines changed

6 files changed

+34
-1
lines changed
 

Diff for: ‎lldb/source/CMakeLists.txt

+7-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ include_directories(
1414
)
1515
endif ()
1616

17+
if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
18+
include_directories(
19+
Plugins/Process/POSIX
20+
)
21+
endif ()
22+
23+
1724
set(lldbBase_SOURCES
1825
lldb.cpp
1926
)
@@ -83,4 +90,3 @@ if ( NOT CMAKE_SYSTEM_NAME MATCHES "Windows" )
8390
endif ()
8491
# FIXME: implement svn/git revision and repository parsing solution on Windows. There is an SVN-only
8592
# revision parsing solution in tools/clang/lib/Basic/CMakelists.txt.
86-

Diff for: ‎lldb/source/Host/CMakeLists.txt

+13
Original file line numberDiff line numberDiff line change
@@ -138,13 +138,22 @@ else()
138138
linux/ThisThread.cpp
139139
)
140140
endif()
141+
141142
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
142143
add_host_subdirectory(freebsd
143144
freebsd/Host.cpp
144145
freebsd/HostInfoFreeBSD.cpp
145146
freebsd/HostThreadFreeBSD.cpp
146147
freebsd/ThisThread.cpp
147148
)
149+
150+
elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
151+
add_host_subdirectory(netbsd
152+
netbsd/Host.cpp
153+
netbsd/HostInfoNetBSD.cpp
154+
netbsd/HostThreadNetBSD.cpp
155+
netbsd/ThisThread.cpp
156+
)
148157
endif()
149158
endif()
150159

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

164173
add_lldb_library(lldbHost ${HOST_SOURCES})
174+
175+
if (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
176+
target_link_libraries(lldbHost kvm)
177+
endif ()

Diff for: ‎lldb/source/Plugins/Platform/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
add_subdirectory(Linux)
33
#elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
44
add_subdirectory(FreeBSD)
5+
#elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
6+
add_subdirectory(NetBSD)
57
#elseif (CMAKE_SYSTEM_NAME MATCHES "Darwin")
68
add_subdirectory(MacOSX)
79
#elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")

Diff for: ‎lldb/source/Plugins/Platform/NetBSD/CMakeLists.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
add_lldb_library(lldbPluginPlatformNetBSD
2+
PlatformNetBSD.cpp
3+
)

Diff for: ‎lldb/source/Plugins/Process/CMakeLists.txt

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ if (CMAKE_SYSTEM_NAME MATCHES "Linux")
44
elseif (CMAKE_SYSTEM_NAME MATCHES "FreeBSD")
55
add_subdirectory(FreeBSD)
66
add_subdirectory(POSIX)
7+
elseif (CMAKE_SYSTEM_NAME MATCHES "NetBSD")
8+
add_subdirectory(POSIX)
79
elseif (CMAKE_SYSTEM_NAME MATCHES "Windows")
810
add_subdirectory(Windows/Live)
911
add_subdirectory(Windows/MiniDump)

Diff for: ‎lldb/tools/lldb-server/CMakeLists.txt

+7
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,13 @@ include_directories(
1414
)
1515
endif ()
1616

17+
if ( CMAKE_SYSTEM_NAME MATCHES "NetBSD" )
18+
include_directories(
19+
../../../../llvm/include
20+
../../source/Plugins/Process/POSIX
21+
)
22+
endif ()
23+
1724
include_directories(../../source)
1825

1926
include(../../cmake/LLDBDependencies.cmake)

0 commit comments

Comments
 (0)
Please sign in to comment.