解决windwos 加载lm模型失败 (#1093)
* fix vc compatibility
* fix windwos load lm model failed
| | |
| | | # with some patch to fix the make errors. |
| | | add_subdirectory(third_party/openfst) |
| | | include_directories(${openfst_SOURCE_DIR}/src/include) |
| | | |
| | | if(WIN32) |
| | | include_directories(${openfst_SOURCE_DIR}/src/lib) |
| | | endif() |
| | | |
| | | endif() |
| | | |
| | | add_subdirectory(third_party/yaml-cpp) |
| | |
| | | if(WIN32) |
| | | add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/execution-charset:utf-8>") |
| | | add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/source-charset:utf-8>") |
| | | add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/bigobj>") |
| | | endif() |
| | | |
| | | add_library(funasr SHARED ${files}) |
| | |
| | | #include "bias-lm.h" |
| | | |
| | | #ifdef _WIN32 |
| | | #include "fst-types.cc" |
| | | #endif |
| | | namespace funasr { |
| | | void print(std::queue<StateId> &q) { |
| | | std::queue<StateId> data = q; |
| | |
| | | FILE(GLOB HEADER_FILES ../include/fst/*.h) |
| | | |
| | | |
| | | if(WIN32) |
| | | add_library(fst STATIC |
| | | compat.cc |
| | | flags.cc |
| | | fst-types.cc |
| | | fst.cc |
| | | mapped-file.cc |
| | | properties.cc |
| | | symbol-table.cc |
| | | symbol-table-ops.cc |
| | | util.cc |
| | | weight.cc |
| | | ${HEADER_FILES} |
| | | ) |
| | | else() |
| | | add_library(fst |
| | | compat.cc |
| | | flags.cc |
| | |
| | | weight.cc |
| | | ${HEADER_FILES} |
| | | ) |
| | | endif() |
| | | |
| | | set_target_properties(fst PROPERTIES |
| | | SOVERSION "${SOVERSION}" |
| | | ) |
| | |
| | | # with some patch to fix the make errors. |
| | | add_subdirectory(${PROJECT_SOURCE_DIR}/../onnxruntime/third_party/openfst openfst) |
| | | include_directories(${openfst_SOURCE_DIR}/src/include) |
| | | |
| | | if(WIN32) |
| | | include_directories(${openfst_SOURCE_DIR}/src/lib) |
| | | endif() |
| | | endif() |
| | | |
| | | |