Skip to content

Commit

Permalink
Add versions of dependencies used to FullReport().
Browse files Browse the repository at this point in the history
Change-Id: I0a41e88e0669364d21ef86146f0b572f0f08ece5
  • Loading branch information
alexsmac committed Apr 5, 2015
1 parent 5b043a9 commit 857c18a
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
7 changes: 7 additions & 0 deletions internal/ceres/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ ENDIF ()
# Also depend on the header files so that they appear in IDEs.
FILE(GLOB CERES_INTERNAL_HDRS *.h)

# Define version information for use in Solver::FullReport.
ADD_DEFINITIONS(-DCERES_EIGEN_VERSION="${EIGEN_VERSION}")

# Include the specialized schur solvers.
IF (SCHUR_SPECIALIZATIONS)
FILE(GLOB CERES_INTERNAL_SCHUR_FILES generated/*.cc)
Expand All @@ -145,10 +148,14 @@ IF (NOT MINIGLOG AND GLOG_FOUND)
ENDIF (NOT MINIGLOG AND GLOG_FOUND)

IF (SUITESPARSE AND SUITESPARSE_FOUND)
# Define version information for use in Solver::FullReport.
ADD_DEFINITIONS(-DCERES_SUITESPARSE_VERSION="${SUITESPARSE_VERSION}")
LIST(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${SUITESPARSE_LIBRARIES})
ENDIF (SUITESPARSE AND SUITESPARSE_FOUND)

IF (CXSPARSE AND CXSPARSE_FOUND)
# Define version information for use in Solver::FullReport.
ADD_DEFINITIONS(-DCERES_CXSPARSE_VERSION="${CXSPARSE_VERSION}")
LIST(APPEND CERES_LIBRARY_PRIVATE_DEPENDENCIES ${CXSPARSE_LIBRARIES})
ENDIF (CXSPARSE AND CXSPARSE_FOUND)

Expand Down
6 changes: 4 additions & 2 deletions internal/ceres/solver_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,18 +40,20 @@ namespace internal {
std::string VersionString() {
std::string value = std::string(CERES_VERSION_STRING);

value += "-eigen-(" + std::string(CERES_EIGEN_VERSION) + ")";

#ifdef CERES_NO_LAPACK
value += "-no_lapack";
#else
value += "-lapack";
#endif

#ifndef CERES_NO_SUITESPARSE
value += "-suitesparse";
value += "-suitesparse-(" + std::string(CERES_SUITESPARSE_VERSION) + ")";
#endif

#ifndef CERES_NO_CXSPARSE
value += "-cxsparse";
value += "-cxsparse-(" + std::string(CERES_CXSPARSE_VERSION) + ")";
#endif

#ifdef CERES_USE_EIGEN_SPARSE
Expand Down

0 comments on commit 857c18a

Please sign in to comment.