You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Build: add compatibility with OpenFST 1.8.x and modern macOS (Apple Silicon)
OpenFST 1.8.x requires C++17 and dropped its own int64/uint32/uint64
typedef aliases in favour of the standard <cstdint> names. This commit
updates the build system and source code to support both the new library
version and Apple Silicon Macs running Homebrew under /opt/homebrew.
Changes:
- CMakeLists.txt: bump C++ standard to 17; use CMAKE_SHARED_LIBRARY_SUFFIX
so -DDYNAMIC_OPENFST=ON works on macOS (.dylib) as well as Linux (.so);
add /opt/homebrew ICU paths for Apple Silicon; embed RPATH so the binary
finds libfst at runtime without DYLD_LIBRARY_PATH; guard the Clang-only
-Wno-implicit-int-float-conversion suppression on jsoncpp
- test/CMakeLists.txt: replace hardcoded WORKING_DIRECTORY build/ with
CMAKE_BINARY_DIR so tests work from any build directory name
- src/AdaptedComposition.h: uint32 -> uint32_t; remove std::unary_function
base (removed in C++17)
- src/AdaptedComposition.cpp, src/StandardComposition.cpp: int64 -> int64_t
- src/fstalign.cpp: uint64 -> uint64_t
- third-party/strtk: mark pointer_ mutable so output iterator can advance
inside a const operator() under C++17
- README.md: add macOS / OpenFST 1.8.x build instructions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
0 commit comments