mirror of
https://gitlab.com/libeigen/eigen.git
synced 2024-12-15 07:10:37 +08:00
bug #1237: Redefine eigen_assert instead of disabling assertions for documentation snippets
This commit is contained in:
parent
7ff5fadcc0
commit
41dcd047d7
@ -24,6 +24,3 @@ foreach(snippet_src ${snippets_SRCS})
|
|||||||
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}
|
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}
|
||||||
PROPERTIES OBJECT_DEPENDS ${snippet_src})
|
PROPERTIES OBJECT_DEPENDS ${snippet_src})
|
||||||
endforeach(snippet_src)
|
endforeach(snippet_src)
|
||||||
|
|
||||||
ei_add_target_property(compile_tut_arithmetic_transpose_aliasing COMPILE_FLAGS -DEIGEN_NO_DEBUG)
|
|
||||||
ei_add_target_property(compile_TopicAliasing_mult4 COMPILE_FLAGS -DEIGEN_NO_DEBUG) # workaroud for Bug 1237
|
|
||||||
|
@ -1,5 +1,8 @@
|
|||||||
#include <Eigen/Eigen>
|
static bool eigen_did_assert = false;
|
||||||
|
#define eigen_assert(X) if(!eigen_did_assert && !(X)){ std::cout << "### Assertion raised in " << __FILE__ << ":" << __LINE__ << ":\n" #X << "\n### The following would happen without assertions:\n"; eigen_did_assert = true;}
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <Eigen/Eigen>
|
||||||
|
|
||||||
#ifndef M_PI
|
#ifndef M_PI
|
||||||
#define M_PI 3.1415926535897932384626433832795
|
#define M_PI 3.1415926535897932384626433832795
|
||||||
|
Loading…
Reference in New Issue
Block a user