Skip to content

Commit

Permalink
Avoid re-downloading files when used as a subproject.
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj committed Feb 6, 2024
1 parent 95774ab commit a5ca300
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
10 changes: 9 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,15 @@ cmake_minimum_required(VERSION 3.13 FATAL_ERROR)

project(kaldifst CXX)

set(KALDIFST_VERSION "1.7.9")
set(KALDIFST_VERSION "1.7.10")

# Disable warning about
#
# "The DOWNLOAD_EXTRACT_TIMESTAMP option was not given and policy CMP0135 is
# not set.
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0")
cmake_policy(SET CMP0135 NEW)
endif()

if(NOT CMAKE_BUILD_TYPE)
message(STATUS "No CMAKE_BUILD_TYPE given, default to Release")
Expand Down
4 changes: 2 additions & 2 deletions cmake/googletest.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function(download_googltest)
# please pre-download googletest
set(possible_file_locations
$ENV{HOME}/Downloads/googletest-1.13.0.tar.gz
${PROJECT_SOURCE_DIR}/googletest-1.13.0.tar.gz
${PROJECT_BINARY_DIR}/googletest-1.13.0.tar.gz
${CMAKE_SOURCE_DIR}/googletest-1.13.0.tar.gz
${CMAKE_BINARY_DIR}/googletest-1.13.0.tar.gz
/tmp/googletest-1.13.0.tar.gz
/star-fj/fangjun/download/github/googletest-1.13.0.tar.gz
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/openfst.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ function(download_openfst)
# please pre-download it
set(possible_file_locations
$ENV{HOME}/Downloads/openfst-win-1.6.5.1.tar.gz
${PROJECT_SOURCE_DIR}/openfst-win-1.6.5.1.tar.gz
${PROJECT_BINARY_DIR}/openfst-win-1.6.5.1.tar.gz
${CMAKE_SOURCE_DIR}/openfst-win-1.6.5.1.tar.gz
${CMAKE_BINARY_DIR}/openfst-win-1.6.5.1.tar.gz
/tmp/openfst-win-1.6.5.1.tar.gz
/star-fj/fangjun/download/github/openfst-win-1.6.5.1.tar.gz
)
Expand Down
4 changes: 2 additions & 2 deletions cmake/pybind11.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ function(download_pybind11)
# please pre-download pybind11
set(possible_file_locations
$ENV{HOME}/Downloads/pybind11-2.10.2.tar.gz
${PROJECT_SOURCE_DIR}/pybind11-2.10.2.tar.gz
${PROJECT_BINARY_DIR}/pybind11-2.10.2.tar.gz
${CMAKE_SOURCE_DIR}/pybind11-2.10.2.tar.gz
${CMAKE_BINARY_DIR}/pybind11-2.10.2.tar.gz
/tmp/pybind11-2.10.2.tar.gz
/star-fj/fangjun/download/github/pybind11-2.10.2.tar.gz
)
Expand Down
2 changes: 2 additions & 0 deletions kaldifst/csrc/kaldi-math.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ int32_t RandInt(int32_t min_val, int32_t max_val,
} else {
KALDIFST_ERR << "rand_int failed because we do not support such large "
"random numbers. (Extend this function).";

return min_val; // unreachable code
}
}
#else
Expand Down

0 comments on commit a5ca300

Please sign in to comment.