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)?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
The contents of
LDADDare used for all target unless this variable is overridden withtarget_LDADD. So if you have many unit tests, and only a few actual programs, you may useLDADDfor the unit tests and override it for each program with different linking requirements.A similar example can be found in the documentation of
LDADD.