Skip to content

How to tell whether a library is static or shared? #12958

Answered by dcbaker
jwillikers asked this question in Q&A
Discussion options

You must be logged in to vote

library() is controlled by the default_library option. This can also include a "both" setting, so you probably want to test for "!static", something like:

lib = library(...)
if get_option('default_library') != 'static'
  if get_option('default_library') == 'both'
    lib = lib.get_shared_library()
  endif
  test(..., args : lib)
endif

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@jwillikers
Comment options

Answer selected by jwillikers
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants