meson.build 441 B

1234567891011121314
  1. project('as-needed test', 'cpp')
  2. # Idea behind this test is to have -Wl,--as-needed prune
  3. # away unneeded linkages, which would otherwise cause global
  4. # static initialiser side-effects to set a boolean to true.
  5. # Credits for portable ISO C++ idea go to sarum9in
  6. libA = library('A', 'libA.cpp')
  7. libB = library('B', 'libB.cpp', link_with : libA)
  8. main_exe = executable('C', 'main.cpp', link_with : [libA, libB])
  9. test('main test', main_exe)