mirror of
https://github.com/csukuangfj/kaldifeat.git
synced 2025-12-11 06:55:26 +00:00
Fix CI tests and compiler warnings
This commit is contained in:
parent
6e41bb2039
commit
d1a473a069
@ -57,5 +57,17 @@ configure_file(
|
|||||||
${CMAKE_SOURCE_DIR}/kaldifeat/python/kaldifeat/torch_version.py @ONLY
|
${CMAKE_SOURCE_DIR}/kaldifeat/python/kaldifeat/torch_version.py @ONLY
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
# disable various warnings for MSVC
|
||||||
|
# 4624: destructor was implicitly defined as deleted because a base class destructor is inaccessible or deleted
|
||||||
|
set(disabled_warnings
|
||||||
|
/wd4624
|
||||||
|
)
|
||||||
|
message(STATUS "Disabled warnings: ${disabled_warnings}")
|
||||||
|
foreach(w IN LISTS disabled_warnings)
|
||||||
|
string(APPEND CMAKE_CXX_FLAGS " ${w} ")
|
||||||
|
endforeach()
|
||||||
|
endif()
|
||||||
|
|
||||||
include_directories(${CMAKE_SOURCE_DIR})
|
include_directories(${CMAKE_SOURCE_DIR})
|
||||||
add_subdirectory(kaldifeat)
|
add_subdirectory(kaldifeat)
|
||||||
|
|||||||
@ -31,9 +31,15 @@ function(kaldifeat_add_test source)
|
|||||||
gtest_main
|
gtest_main
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# NOTE: We set the working directory here so that
|
||||||
|
# it works also on windows. The reason is that
|
||||||
|
# the required DLLs are inside ${TORCH_DIR}/lib
|
||||||
|
# and they can be found by the exe if the current
|
||||||
|
# working directory is ${TORCH_DIR}\lib
|
||||||
add_test(NAME "Test.${name}"
|
add_test(NAME "Test.${name}"
|
||||||
COMMAND
|
COMMAND
|
||||||
$<TARGET_FILE:${name}>
|
$<TARGET_FILE:${name}>
|
||||||
|
WORKING_DIRECTORY ${TORCH_DIR}/lib
|
||||||
)
|
)
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
@ -47,4 +53,5 @@ if(kaldifeat_BUILD_TESTS)
|
|||||||
foreach(source IN LISTS test_srcs)
|
foreach(source IN LISTS test_srcs)
|
||||||
kaldifeat_add_test(${source})
|
kaldifeat_add_test(${source})
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user