Update CMakeLists.txt so that kaldifeat can be included in k2.

This commit is contained in:
Fangjun Kuang 2021-10-11 13:55:09 +08:00
parent 5e1a9b853d
commit b5c19185ea
2 changed files with 7 additions and 4 deletions

View File

@ -32,12 +32,15 @@ list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake) list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
option(BUILD_TESTS "Whether to build tests or not" ON) option(kaldifeat_BUILD_TESTS "Whether to build tests or not" ON)
if(CMAKE_SOURCE_DIR STREQUAL PROJECT_SOURCE_DIR)
include(pybind11)
endif()
include(pybind11)
include(torch) include(torch)
if(BUILD_TESTS) if(kaldifeat_BUILD_TESTS)
include(googletest) include(googletest)
enable_testing() enable_testing()
endif() endif()

View File

@ -36,7 +36,7 @@ function(kaldifeat_add_test source)
) )
endfunction() endfunction()
if(BUILD_TESTS) if(kaldifeat_BUILD_TESTS)
# please sort the source files alphabetically # please sort the source files alphabetically
set(test_srcs set(test_srcs
feature-window-test.cc feature-window-test.cc