introduce EIGEN_MAKING_DOCS to tell whether we're compiling the docs examples

This commit is contained in:
Benoit Jacob 2011-02-06 12:51:42 -05:00
parent 02ee26a3a5
commit 9105e62d0a
2 changed files with 7 additions and 5 deletions

View File

@ -232,8 +232,14 @@
#endif
#ifndef EIGEN_DEFAULT_IO_FORMAT
#ifdef EIGEN_MAKING_DOCS
// format used in Eigen's documentation
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat(3, 0, " ", "\n", "", "")
#else
#define EIGEN_DEFAULT_IO_FORMAT Eigen::IOFormat()
#endif
#endif
// just an empty macro !
#define EIGEN_EMPTY
@ -246,10 +252,6 @@
#define EIGEN_MAKESTRING2(a) #a
#define EIGEN_MAKESTRING(a) EIGEN_MAKESTRING2(a)
// format used in Eigen's documentation
// needed to define it here as escaping characters in CMake add_definition's argument seems very problematic.
#define EIGEN_DOCS_IO_FORMAT IOFormat(3, 0, " ", "\n", "", "")
#if defined(_MSC_VER) && (!defined(__INTEL_COMPILER))
#define EIGEN_INHERIT_ASSIGNMENT_EQUAL_OPERATOR(Derived) \
using Base::operator =;

View File

@ -33,7 +33,7 @@ configure_file(
set(examples_targets "")
set(snippets_targets "")
add_definitions("-DEIGEN_DEFAULT_IO_FORMAT=EIGEN_DOCS_IO_FORMAT")
add_definitions("-DEIGEN_MAKING_DOCS")
add_subdirectory(examples)
add_subdirectory(snippets)