Repository navigation
Fix OpenFst CMake installation and document install options. - #428
Open
copybara-service[bot] wants to merge 1 commit into
Open
copybara-service[bot] wants to merge 1 commit into
copybara-service[bot] wants to merge 1 commit into
Conversation
Enabling `OPENFST_ENABLE_INSTALL` with default `OPENFST_BUILD_TESTS=ON` failed CMake export generation because test-only `fststatus_matchers` was added to `OpenFstTargets` while linking non-exported `GTest::gtest` and `GTest::gmock`. Building with `BUILD_SHARED_LIBS=ON` also compiled internal `*-main` CLI helper libraries as shared libraries without installing them, leaving installed executables with missing runtime library dependencies, while `README.md` omitted `-DOPENFST_ENABLE_INSTALL=ON` and `-DOPENFST_USE_SYSTEM_ABSEIL=ON` from its installation steps. Exclude test-only `fststatus_matchers` and `status_matchers.h` from installation and `OpenFstTargets`, mark internal `*-main` helper libraries `STATIC` so they link directly into CLI executables regardless of `BUILD_SHARED_LIBS`, declare the missing `OPENFST_ENABLE_CATEGORIAL` option and fix `FATAL_ERROR` message spacing in `CMakeLists.txt`, and document the installation workflow and general CMake options in `README.md`. PiperOrigin-RevId: 1020359567
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix OpenFst CMake installation and document install options.
Enabling
OPENFST_ENABLE_INSTALLwith defaultOPENFST_BUILD_TESTS=ONfailed CMake export generation because test-onlyfststatus_matcherswas added toOpenFstTargetswhile linking non-exportedGTest::gtestandGTest::gmock. Building withBUILD_SHARED_LIBS=ONalso compiled internal*-mainCLI helper libraries as shared libraries without installing them, leaving installed executables with missing runtime library dependencies, whileREADME.mdomitted-DOPENFST_ENABLE_INSTALL=ONand-DOPENFST_USE_SYSTEM_ABSEIL=ONfrom its installation steps.Exclude test-only
fststatus_matchersandstatus_matchers.hfrom installation andOpenFstTargets, mark internal*-mainhelper librariesSTATICso they link directly into CLI executables regardless ofBUILD_SHARED_LIBS, declare the missingOPENFST_ENABLE_CATEGORIALoption and fixFATAL_ERRORmessage spacing inCMakeLists.txt, and document the installation workflow and general CMake options inREADME.md.