diff --git a/src/cbmc/CMakeLists.txt b/src/cbmc/CMakeLists.txt index 14ab91958a0..4266fedae42 100644 --- a/src/cbmc/CMakeLists.txt +++ b/src/cbmc/CMakeLists.txt @@ -57,8 +57,9 @@ endif() # bash completion if(NOT WIN32) + find_program(BASH_PROGRAM bash REQUIRED) add_custom_command(OUTPUT "${CBMC_ROOT_DIR}/scripts/bash-autocomplete/cbmc.sh" - COMMAND "${CBMC_ROOT_DIR}/scripts/bash-autocomplete/extract_switches.sh" "${CMAKE_CXX_COMPILER}" + COMMAND "${BASH_PROGRAM}" "${CBMC_ROOT_DIR}/scripts/bash-autocomplete/extract_switches.sh" "${CMAKE_CXX_COMPILER}" DEPENDS $ ) add_custom_target(cbmc.sh ALL