diff options
Diffstat (limited to 'eigen/doc/special_examples/CMakeLists.txt')
-rw-r--r-- | eigen/doc/special_examples/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/eigen/doc/special_examples/CMakeLists.txt b/eigen/doc/special_examples/CMakeLists.txt index 3ab75db..101fbc5 100644 --- a/eigen/doc/special_examples/CMakeLists.txt +++ b/eigen/doc/special_examples/CMakeLists.txt @@ -19,3 +19,17 @@ if(QT4_FOUND) add_dependencies(all_examples Tutorial_sparse_example) endif(QT4_FOUND) +check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CPP11) +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() |