2019-10-31 11:36:37 -05:00
|
|
|
file(GLOB examples_SRCS "*.cpp")
|
2009-03-18 20:06:06 +00:00
|
|
|
|
2019-10-31 11:36:37 -05:00
|
|
|
add_custom_target(unsupported_examples)
|
2009-03-18 20:06:06 +00:00
|
|
|
|
2019-10-31 11:36:37 -05:00
|
|
|
foreach(example_src ${examples_SRCS})
|
|
|
|
|
get_filename_component(example ${example_src} NAME_WE)
|
|
|
|
|
add_executable(example_${example} ${example_src})
|
2010-04-19 11:19:22 -04:00
|
|
|
if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
|
|
|
|
|
target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
|
|
|
|
|
endif()
|
2025-02-01 00:00:31 +00:00
|
|
|
target_link_libraries(example_${example} Eigen3::Eigen)
|
2019-10-31 11:36:37 -05:00
|
|
|
add_custom_command(
|
2010-04-19 11:19:22 -04:00
|
|
|
TARGET example_${example}
|
|
|
|
|
POST_BUILD
|
2014-08-22 12:13:07 +02:00
|
|
|
COMMAND example_${example}
|
2010-04-19 11:19:22 -04:00
|
|
|
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
|
|
|
|
|
)
|
2019-10-31 11:36:37 -05:00
|
|
|
add_dependencies(unsupported_examples example_${example})
|
|
|
|
|
endforeach(example_src)
|
2019-11-28 10:08:54 +00:00
|
|
|
|
|
|
|
|
if(EIGEN_TEST_SYCL)
|
|
|
|
|
add_subdirectory(SYCL)
|
|
|
|
|
endif(EIGEN_TEST_SYCL)
|