Unverified Commit df9d0b47 authored by moto's avatar moto Committed by GitHub
Browse files

Guard Kaldi's version generation (#1715)

When building torchaudio from source, `get_version.sh` from kaldi is executed everytime,
which results in kaldi-bindings to be always rebuilt.

This commit add "if" guard to the part so that they are not always executed.
parent a1567702
set(KALDI_REPO ${CMAKE_CURRENT_SOURCE_DIR}/submodule) set(KALDI_REPO ${CMAKE_CURRENT_SOURCE_DIR}/submodule)
if (NOT EXISTS ${KALDI_REPO}/src/base/version.h)
# Apply custom patch # Apply custom patch
execute_process( execute_process(
WORKING_DIRECTORY ${KALDI_REPO} WORKING_DIRECTORY ${KALDI_REPO}
...@@ -14,6 +15,7 @@ execute_process( ...@@ -14,6 +15,7 @@ execute_process(
WORKING_DIRECTORY ${KALDI_REPO}/src/base WORKING_DIRECTORY ${KALDI_REPO}/src/base
COMMAND sh get_version.sh COMMAND sh get_version.sh
) )
endif()
set(KALDI_SOURCES set(KALDI_SOURCES
src/matrix/kaldi-vector.cc src/matrix/kaldi-vector.cc
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment