probcomp / hierarchical-irm

Probabilistic structure discovery for rich relational systems
Apache License 2.0
1 stars 1 forks source link

Makefile uses %.out rule instead of %test.out rule when building tests (macOS) #16

Closed alex-lew closed 1 month ago

alex-lew commented 1 month ago

I am using GNU Make 3.81, built for i386-apple-darwin11.3.0.

I'm not sure why exactly, since I would have thought %test.out is more specific, but currently make distributions/beta_bernoulli_test.out is running the rule for %.out, instead of the rule %test.out.

Because -I$(BOOST_ROOT) is only included for the %test.out rule, the compiler is not finding Boost, and so the test doesn't build. (I get the same behavior for make unittests, which ends up trying to make distributions/beta_bernoulli_test.out)

Seems like there are several possible fixes (moving %test.out earlier in the Makefile, removing %test.out and adding BOOST_ROOT to INCFLAGS, etc.) but I don't work very often in C/C++ and wasn't sure what the right one was.

ThomasColthurst commented 1 month ago

Hmm. I'm happy to help with this bug, but I don't have a Mac, so I can't really test out possible solutions.

One easy thing you can try is upgrading your version of GNU Make. I'm using GNU Make 4.3.

alex-lew commented 1 month ago

That did the trick, thanks!