mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
cmake: Improve command detection (#14166)
This commit is contained in:
@@ -7,6 +7,8 @@ find_command(
|
||||
LLVM_VERSION
|
||||
COMMAND
|
||||
clang-format
|
||||
VERSION
|
||||
${LLVM_VERSION}
|
||||
REQUIRED
|
||||
OFF
|
||||
)
|
||||
|
||||
@@ -7,6 +7,8 @@ find_command(
|
||||
LLVM_VERSION
|
||||
COMMAND
|
||||
clang-tidy
|
||||
VERSION
|
||||
${LLVM_VERSION}
|
||||
REQUIRED
|
||||
OFF
|
||||
)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
# IWYU = "Include What You Use"
|
||||
# https://include-what-you-use.org/
|
||||
|
||||
setx(IWYU_SOURCE_PATH ${CACHE_PATH}/iwyu-${LLVM_VERSION_MAJOR})
|
||||
setx(IWYU_SOURCE_PATH ${CACHE_PATH}/iwyu-${LLVM_VERSION})
|
||||
setx(IWYU_BUILD_PATH ${IWYU_SOURCE_PATH}/build)
|
||||
setx(IWYU_PROGRAM ${IWYU_BUILD_PATH}/bin/include-what-you-use)
|
||||
|
||||
@@ -11,7 +11,7 @@ register_repository(
|
||||
REPOSITORY
|
||||
include-what-you-use/include-what-you-use
|
||||
BRANCH
|
||||
clang_${LLVM_VERSION_MAJOR}
|
||||
clang_${LLVM_VERSION}
|
||||
PATH
|
||||
${IWYU_SOURCE_PATH}
|
||||
)
|
||||
|
||||
@@ -95,7 +95,7 @@ register_command(
|
||||
if(GIT_CHANGED_SOURCES)
|
||||
set(PRETTIER_CHANGED_SOURCES)
|
||||
foreach(source ${PRETTIER_SOURCES})
|
||||
list(FIND PRETTIER_CHANGED_SOURCES ${source} index)
|
||||
list(FIND GIT_CHANGED_SOURCES ${source} index)
|
||||
if(NOT ${index} EQUAL -1)
|
||||
list(APPEND PRETTIER_CHANGED_SOURCES ${source})
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user