Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6150129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:34:17+00:00 2026-05-23T19:34:17+00:00

I placed unit tests within the same directory of source code. But how could

  • 0

I placed unit tests within the same directory of source code. But how could I set the LDADD in Makefile.am for all these unit tests to use specific libraries (e.g google test)?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:34:18+00:00Added an answer on May 23, 2026 at 7:34 pm

    The contents of LDADD are used for all target unless this variable is overridden with target_LDADD. So if you have many unit tests, and only a few actual programs, you may use LDADD for the unit tests and override it for each program with different linking requirements.

    LDADD = libtest.a   # Used by default for all targets
    
    # Unit tests, using above LDADD
    check_PROGRAMS = one two three
    one_SOURCES = one.c
    two_SOURCES = two.c
    three_SOURCES = three.c
    
    # Main program
    bin_PROGRAMS = main
    main_SOURCES = main.c
    main_LDADD =        # Override the LDADD setting.
    

    A similar example can be found in the documentation of LDADD.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We've all been there. You have written some code and unit tests, the tests
I would like to use hsql within my DAO unit tests for a web
When building a suite of unit tests for Java code, is there a convention
I'm currently writing a set of unit tests for a Python microblogging library, and
So I have a set of unit/integration tests and a set of selenium rc
I've got a bunch of legacy code that I need to write unit tests
We are looking at adding unit tests to our C# code base. I am
I recently run into problems when running all my unit tests at once. I
When writing unit tests, do you place your tests inside the assembly you wish
I'm programming some unit test with the Google test framework. But I want to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.