Squashed 'third_party/eigen/' changes from 61d72f6..cf794d3


Change-Id: I9b814151b01f49af6337a8605d0c42a3a1ed4c72
git-subtree-dir: third_party/eigen
git-subtree-split: cf794d3b741a6278df169e58461f8529f43bce5d
diff --git a/doc/special_examples/CMakeLists.txt b/doc/special_examples/CMakeLists.txt
index 3ab75db..66ba4de 100644
--- a/doc/special_examples/CMakeLists.txt
+++ b/doc/special_examples/CMakeLists.txt
@@ -19,3 +19,16 @@
   add_dependencies(all_examples Tutorial_sparse_example)
 endif(QT4_FOUND)
 
+if(EIGEN_COMPILER_SUPPORT_CPP11)
+  add_executable(random_cpp11 random_cpp11.cpp)
+  target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
+  add_dependencies(all_examples random_cpp11)
+  ei_add_target_property(random_cpp11 COMPILE_FLAGS "-std=c++11")
+
+  add_custom_command(
+    TARGET random_cpp11
+    POST_BUILD
+    COMMAND random_cpp11
+    ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out
+  )
+endif()