libprima / prima

PRIMA is a package for solving general nonlinear optimization problems without using derivatives. It provides the reference implementation for Powell's derivative-free optimization methods, i.e., COBYLA, UOBYQA, NEWUOA, BOBYQA, and LINCOA. PRIMA means Reference Implementation for Powell's methods with Modernization and Amelioration, P for Powell.
http://libprima.net
BSD 3-Clause "New" or "Revised" License
304 stars 40 forks source link

Either make tests and examples independent or enable examples when building tests #120

Open barracuda156 opened 9 months ago

barracuda156 commented 9 months ago

Tests do not run if examples are not explicitly enabled in the build. This is somewhat counter-intuitive: perhaps, either make these separate or make examples a part of tests without a separate configure setting. Otherwise running tests with -DPRIMA_ENABLE_TESTING=ON but without -DPRIMA_ENABLE_EXAMPLES=ON leaves all tests broken.

zaikunzhang commented 9 months ago

Tests do not run if examples are not explicitly enabled in the build. This is somewhat counter-intuitive: perhaps, either make these separate or make examples a part of tests without a separate configure setting. Otherwise running tests with -DPRIMA_ENABLE_TESTING=ON but without -DPRIMA_ENABLE_EXAMPLES=ON leaves all tests broken.

@jschueller Could you have a look! Shouldn't DPRIMA_ENABLE_EXAMPLES be set to ON if DPRIMA_ENABLE_TESTING is ON? Or should we merge the two options? Thank you.