c++ - Can makefile.am set LDADD for a set of target? -



c++ - Can makefile.am set LDADD for a set of target? -

i placed unit tests within same directory of source code. how set ldadd in makefile.am these unit tests utilize specific libraries (e.g google test)?

the contents of ldadd used target unless variable overridden target_ldadd. if have many unit tests, , few actual programs, may utilize ldadd unit tests , override each programme different linking requirements.

ldadd = libtest.a # used default targets # unit tests, using above ldadd check_programs = 1 2 3 one_sources = one.c two_sources = two.c three_sources = three.c # main programme bin_programs = main main_sources = main.c main_ldadd = # override ldadd setting.

a similar illustration can found in the documentation of ldadd.

c++ unit-testing automake googletest

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -