Skip to content

Commit 4c21df2

Browse files
[lldb] add a warning if dirname is not in the PATH (llvm#164494)
This patch adds a check in lldb's API test CMakeLists file to ensure that `dirname` is in the PATH, which is not obvious on Windows. --------- Co-authored-by: nerix <[email protected]>
1 parent 10999b6 commit 4c21df2

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lldb/test/API/CMakeLists.txt

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,16 @@ else()
7979
endif()
8080
endif()
8181

82+
find_program(LLDB_DIRNAME_PATH dirname)
83+
if(LLDB_DIRNAME_PATH)
84+
message(STATUS "Found dirname: ${LLDB_DIRNAME_PATH}")
85+
else()
86+
message(STATUS "Could NOT find 'dirname'")
87+
message(WARNING
88+
"Many LLDB API tests require the GNU coreutils tools. Please make "
89+
"sure they are installed and in PATH.")
90+
endif()
91+
8292
if (TARGET clang)
8393
set(LLDB_DEFAULT_TEST_COMPILER "${LLVM_TOOLS_BINARY_DIR}/clang${CMAKE_EXECUTABLE_SUFFIX}")
8494
else()

0 commit comments

Comments
 (0)