From a164a66b7715b52c10c6b0ec752f4a14c0422c04 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Mon, 21 May 2012 23:38:25 +0000 Subject: [PATCH 2/2] In progress with cmake config files --- CMakeLists.txt | 7 +++++++ gtsam/CMakeLists.txt | 2 +- gtsam/base/cholesky.h | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e6c9bc422..eb55a989a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -93,6 +93,9 @@ if (GTSAM_BUILD_TESTS) endif() # Find boost +if(CYGWIN OR MSVC OR WIN32) + set(Boost_USE_STATIC_LIBS 1) +endif() find_package(Boost 1.40 COMPONENTS serialization REQUIRED) # General build settings @@ -128,6 +131,10 @@ if (GTSAM_BUILD_UNSTABLE) add_subdirectory(gtsam_unstable) endif(GTSAM_BUILD_UNSTABLE) +# Make config file +include(GtsamMakeConfigFile) +GtsamMakeConfigFile(gtsam) + # Set up CPack set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "GTSAM") set(CPACK_PACKAGE_VENDOR "Frank Dellaert, Georgia Institute of Technology") diff --git a/gtsam/CMakeLists.txt b/gtsam/CMakeLists.txt index b3e639917..a905b6944 100644 --- a/gtsam/CMakeLists.txt +++ b/gtsam/CMakeLists.txt @@ -97,6 +97,6 @@ if (GTSAM_BUILD_SHARED_LIBRARY) CLEAN_DIRECT_OUTPUT 1 VERSION ${gtsam_version} SOVERSION ${gtsam_soversion}) - install(TARGETS gtsam-shared LIBRARY DESTINATION lib ) + install(TARGETS gtsam-shared DESTINATION lib ) endif(GTSAM_BUILD_SHARED_LIBRARY) diff --git a/gtsam/base/cholesky.h b/gtsam/base/cholesky.h index 50d3b24a8..46d342d24 100644 --- a/gtsam/base/cholesky.h +++ b/gtsam/base/cholesky.h @@ -34,7 +34,7 @@ struct NegativeMatrixException : public std::exception { Matrix A; ///< The original matrix attempted to factor Matrix U; ///< The produced upper-triangular factor Matrix D; ///< The produced diagonal factor - Detail(const Matrix& _A, const Matrix& _U, const Matrix& _D) /**< Detail constructor */ : A(_A), U(_U), D(_D) {} + Detail(const Matrix& A, const Matrix& U, const Matrix& D) /**< Detail constructor */ : A(A), U(U), D(D) {} void print(const std::string& str = "") const { std::cout << str << "\n"; gtsam::print(A, " A: ");