From 9105e62d0a39d3a3e7864622fed5c393b25693a6 Mon Sep 17 00:00:00 2001 From: Benoit Jacob Date: Sun, 6 Feb 2011 12:51:42 -0500 Subject: introduce EIGEN_MAKING_DOCS to tell whether we're compiling the docs examples --- Eigen/src/Core/util/Macros.h | 10 ++++++---- doc/CMakeLists.txt | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Eigen/src/Core/util/Macros.h b/Eigen/src/Core/util/Macros.h index b1bdea44e..dd28b2bfc 100644 --- a/Eigen/src/Core/util/Macros.h +++ b/Eigen/src/Core/util/Macros.h @@ -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 =; diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt index af756a516..43f31b91e 100644 --- a/doc/CMakeLists.txt +++ b/doc/CMakeLists.txt @@ -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) -- cgit v1.2.3