Skip to content

Commit

Permalink
Merge pull request github#15091 from github/redsun82/fix-cmake-bazel-…
Browse files Browse the repository at this point in the history
…version

Bazel/CMake: use bazelisk to use correct bazel version
  • Loading branch information
redsun82 authored Dec 13, 2023
2 parents 4d922dd + 9e300a9 commit 307da34
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion misc/bazel/cmake/setup.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down

0 comments on commit 307da34

Please sign in to comment.