add guards for system Metis

release/4.3a0
Varun Agrawal 2021-08-26 02:22:28 -04:00
parent ad73645c83
commit 4f33cb8835
3 changed files with 11 additions and 0 deletions

View File

@ -77,3 +77,6 @@
// Support Metis-based nested dissection
#cmakedefine GTSAM_TANGENT_PREINTEGRATION
// Whether to use the system installed Metis instead of the provided one
#cmakedefine GTSAM_USE_SYSTEM_METIS

View File

@ -20,6 +20,8 @@
#include "FindSeparator.h"
#ifndef GTSAM_USE_SYSTEM_METIS
extern "C" {
#include <metis.h>
#include "metislib.h"
@ -564,3 +566,5 @@ namespace gtsam { namespace partition {
}
}} //namespace
#endif

View File

@ -20,6 +20,8 @@ using namespace std;
using namespace gtsam;
using namespace gtsam::partition;
#ifndef GTSAM_USE_SYSTEM_METIS
/* ************************************************************************* */
// x0 - x1 - x2
// l3 l4
@ -227,6 +229,8 @@ TEST ( Partition, findSeparator3_with_reduced_camera )
LONGS_EQUAL(2, partitionTable[28]);
}
#endif
/* ************************************************************************* */
int main() { TestResult tr; return TestRegistry::runAllTests(tr);}
/* ************************************************************************* */