Switched constants to macros to avoid unused variable warnings

release/4.3a0
Richard Roberts 2013-04-25 16:32:05 +00:00
parent eeef9eab32
commit 58bade6aa3
2 changed files with 4 additions and 6 deletions

View File

@ -18,10 +18,8 @@
#pragma once
// Paths to example datasets distributed with GTSAM
namespace gtsam {
static const char* SourceTreeDatasetDir = "@CMAKE_SOURCE_DIR@/examples/Data";
static const char* InstalledDatasetDir = "@GTSAM_TOOLBOX_INSTALL_PATH@/gtsam_examples/Data";
}
#define GTSAM_SOURCE_TREE_DATASET_DIR "@CMAKE_SOURCE_DIR@/examples/Data"
#define GTSAM_INSTALLED_DATASET_DIR "@GTSAM_TOOLBOX_INSTALL_PATH@/gtsam_examples/Data"
// Whether GTSAM is compiled to use quaternions for Rot3 (otherwise uses rotation matrices)
#cmakedefine GTSAM_USE_QUATERNIONS

View File

@ -40,8 +40,8 @@ namespace gtsam {
string findExampleDataFile(const string& name) {
// Search source tree and installed location
vector<string> rootsToSearch;
rootsToSearch.push_back(SourceTreeDatasetDir); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt
rootsToSearch.push_back(InstalledDatasetDir); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt
rootsToSearch.push_back(GTSAM_SOURCE_TREE_DATASET_DIR); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt
rootsToSearch.push_back(GTSAM_INSTALLED_DATASET_DIR); // Defined by CMake, see gtsam/gtsam/CMakeLists.txt
// Search for filename as given, and with .graph and .txt extensions
vector<string> namesToSearch;