Bazel/CMake: use bazelisk to use correct bazel version

(cherry picked from commit 819fc52854)
This commit is contained in:
Paolo Tranquilli 2023-12-13 15:32:06 +01:00
Родитель 9543c23aba
Коммит 452b8d22a3
1 изменённых файлов: 5 добавлений и 1 удалений

Просмотреть файл

@ -5,8 +5,12 @@ if (CREATE_COMPILATION_DATABASE_LINK)
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
endif ()
if (NOT DEFINED BAZEL_BIN)
set(BAZEL_BIN "bazelisk")
endif ()
macro(bazel)
execute_process(COMMAND bazel ${ARGN}
execute_process(COMMAND ${BAZEL_BIN} ${ARGN}
COMMAND_ERROR_IS_FATAL ANY
OUTPUT_STRIP_TRAILING_WHITESPACE
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR})