kpu / mtplz

Code for the paper Faster Phrase-Based Decoding by Refining Feature State
http://kheafield.com/professional/
Other
14 stars 12 forks source link

-DFORCE_STATIC=OFF does not have effect, lib is still built as static #5

Open barracuda156 opened 1 year ago

barracuda156 commented 1 year ago

List of files that get installed on macOS:

a ./opt/local/lib/libkenlm.a
a ./opt/local/lib/libkenlm_builder.a
a ./opt/local/lib/libkenlm_filter.a
a ./opt/local/lib/libkenlm_util.a
a ./opt/local/bin/binarize_phrase_table
a ./opt/local/bin/build_binary
a ./opt/local/bin/count_ngrams
a ./opt/local/bin/decode
a ./opt/local/bin/filter
a ./opt/local/bin/fragment
a ./opt/local/bin/kenlm_benchmark
a ./opt/local/bin/lmplz
a ./opt/local/bin/phrase_table_vocab
a ./opt/local/bin/probing_hash_table_benchmark
a ./opt/local/bin/query

From what I understand, -DFORCE_STATIC is not the default, however even passing -DFORCE_STATIC=OFF explicitly has no effect, and static libs are built.

kpu commented 1 year ago

The default is prefer static linkage. -DFORCE_STATIC means fail to compile if dependencies are only available dynamically.

barracuda156 commented 1 year ago

The default is prefer static linkage. -DFORCE_STATIC means fail to compile if dependencies are only available dynamically.

@kpu Got it, thank you. But compiling dylib is still supported as an option or not?