Skip to content

Commit 505f12e

Browse files
authored
build: pass along the CMake path (#1410)
When building the subproject, we would invoke `cmake` directly, relying on the path lookup of the tool, which may or may not match the currently executing CMake. Use `CMAKE_COMMAND` which gives us the path to the current CMake executable ensuring that we use the same CMake for building the dependencies.
1 parent 18367c0 commit 505f12e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cmake/external_rules.cmake

+2-2
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ function(build_external_dependencies)
241241
if(NOT ANDROID AND NOT IOS)
242242
if (FIREBASE_USE_BORINGSSL)
243243
execute_process(
244-
COMMAND ${ENV_COMMAND} cmake -DOPENSSL_NO_ASM=TRUE ${CMAKE_SUB_CONFIGURE_OPTIONS} ../boringssl
244+
COMMAND ${ENV_COMMAND} ${CMAKE_COMMAND} -DOPENSSL_NO_ASM=TRUE ${CMAKE_SUB_CONFIGURE_OPTIONS} ../boringssl
245245
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/src/boringssl-build
246246
RESULT_VARIABLE boringssl_configure_status
247247
)
@@ -255,7 +255,7 @@ function(build_external_dependencies)
255255
endif()
256256

257257
execute_process(
258-
COMMAND ${ENV_COMMAND} cmake --build . ${CMAKE_SUB_BUILD_OPTIONS} --target ssl crypto -- ${cmake_build_args}
258+
COMMAND ${ENV_COMMAND} ${CMAKE_COMMAND} --build . ${CMAKE_SUB_BUILD_OPTIONS} --target ssl crypto -- ${cmake_build_args}
259259
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}/external/src/boringssl-build
260260
RESULT_VARIABLE boringssl_build_status
261261
)

0 commit comments

Comments
 (0)