1if(NOT EIGEN_TEST_NOQT) 2 find_package(Qt4) 3 if(QT4_FOUND) 4 include(${QT_USE_FILE}) 5 endif() 6endif(NOT EIGEN_TEST_NOQT) 7 8if(QT4_FOUND) 9 add_executable(Tutorial_sparse_example Tutorial_sparse_example.cpp Tutorial_sparse_example_details.cpp) 10 target_link_libraries(Tutorial_sparse_example ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY}) 11 12 add_custom_command( 13 TARGET Tutorial_sparse_example 14 POST_BUILD 15 COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/../html/ 16 COMMAND Tutorial_sparse_example ARGS ${CMAKE_CURRENT_BINARY_DIR}/../html/Tutorial_sparse_example.jpeg 17 ) 18 19 add_dependencies(all_examples Tutorial_sparse_example) 20endif(QT4_FOUND) 21 22check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CPP11) 23if(EIGEN_COMPILER_SUPPORT_CPP11) 24 add_executable(random_cpp11 random_cpp11.cpp) 25 target_link_libraries(random_cpp11 ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO}) 26 add_dependencies(all_examples random_cpp11) 27 ei_add_target_property(random_cpp11 COMPILE_FLAGS "-std=c++11") 28 29 add_custom_command( 30 TARGET random_cpp11 31 POST_BUILD 32 COMMAND random_cpp11 33 ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out 34 ) 35endif() 36