Skip to content

Commit 66945ba

Browse files
committed
Make sure the clone is in the binary directory - if cmake is run from somewhere else and specifying the build directory via options, we need to be explicit about this. Not doing so resulted in a bext configure attempt finding the top level CMakeLists.txt file from brlcad again and re-running that configure. Noticed it in CI testing when we were losing a setting, but consequences were probably wilder than just that...
1 parent 3c48683 commit 66945ba

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

misc/CMake/BRLCAD_EXT_Setup.cmake

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,12 +38,15 @@ function(brlcad_ext_setup)
3838
set(BRLCAD_EXT_BUILD_DIR ${CMAKE_CURRENT_BINARY_DIR}/bext_build)
3939
set(BRLCAD_EXT_INSTALL_DIR ${CMAKE_CURRENT_BINARY_DIR})
4040

41-
# If we don't have
41+
# If we don't have the bext source directory, try to clone it
4242
if (NOT DEFINED BRLCAD_EXT_SOURCE_DIR)
4343
set(BRLCAD_EXT_SOURCE_DIR ${CMAKE_CURRENT_BINARY_DIR}/bext)
4444
if (NOT EXISTS ${BRLCAD_EXT_SOURCE_DIR})
4545
find_program(GIT_EXEC git REQUIRED)
46-
execute_process(COMMAND ${GIT_EXEC} clone https://github.com/BRL-CAD/bext.git)
46+
execute_process(
47+
COMMAND ${GIT_EXEC} clone https://github.com/BRL-CAD/bext.git
48+
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
49+
)
4750
endif (NOT EXISTS ${BRLCAD_EXT_SOURCE_DIR})
4851
endif (NOT DEFINED BRLCAD_EXT_SOURCE_DIR)
4952
if (NOT EXISTS ${BRLCAD_EXT_SOURCE_DIR})

0 commit comments

Comments
 (0)