mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-03-07 18:27:40 +08:00
40 lines
1.2 KiB
CMake
40 lines
1.2 KiB
CMake
|
|
if(NOT EIGEN_TEST_NOQT)
|
|
find_package(Qt4)
|
|
if(QT4_FOUND)
|
|
include(${QT_USE_FILE})
|
|
endif()
|
|
endif(NOT EIGEN_TEST_NOQT)
|
|
|
|
|
|
if(QT4_FOUND)
|
|
add_executable(Tutorial_sparse_example Tutorial_sparse_example.cpp Tutorial_sparse_example_details.cpp)
|
|
target_link_libraries(Tutorial_sparse_example ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY})
|
|
|
|
add_custom_command(
|
|
TARGET Tutorial_sparse_example
|
|
POST_BUILD
|
|
COMMAND Tutorial_sparse_example ARGS ${CMAKE_CURRENT_BINARY_DIR}/../html/Tutorial_sparse_example.jpeg
|
|
)
|
|
|
|
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")
|
|
|
|
get_target_property(random_cpp11_exec
|
|
random_cpp11 LOCATION)
|
|
add_custom_command(
|
|
TARGET random_cpp11
|
|
POST_BUILD
|
|
COMMAND ${random_cpp11_exec}
|
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/random_cpp11.out
|
|
)
|
|
|
|
|
|
endif() |