Skip to content

Commit cff78cc

Browse files
committed
Cmake generator: Remove space in argument.
This space breaks when upgrading bazelisk on Windows. Somehow, a space inside the argument messes up some argument-parsin somewhere. Porbably due to Windows argument parsing being not well-defined in how it splits a string into argv. Removing the space works around the problem. If the space is included, cmake suddenly can't find the bazelisk binary anymore, despite happily executing `info output_base` earlier.
1 parent 58ce3e8 commit cff78cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

misc/bazel/cmake/setup.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ endmacro()
4242
macro(generate_and_include)
4343
file(REMOVE "${BAZEL_WORKSPACE}/.bazel-cmake/BUILD.bazel")
4444
# use aquery to only get targets compatible with the current platform
45-
bazel_even_if_failing(aquery "kind(\"cc_test|cc_binary\", ${ARGN})" ${BAZEL_BUILD_OPTIONS} --output=jsonproto OUTPUT_VARIABLE BAZEL_AQUERY_RESULT)
45+
bazel_even_if_failing(aquery "kind(\"cc_test|cc_binary\",${ARGN})" ${BAZEL_BUILD_OPTIONS} --output=jsonproto OUTPUT_VARIABLE BAZEL_AQUERY_RESULT)
4646
string(JSON BAZEL_JSON_TARGETS GET "${BAZEL_AQUERY_RESULT}" targets)
4747
string(JSON LAST_IDX LENGTH "${BAZEL_JSON_TARGETS}")
4848
math(EXPR LAST_IDX "${LAST_IDX} - 1")

0 commit comments

Comments
 (0)