CMakeLists.txt 736 B

123456789101112131415161718192021222324
  1. file(GLOB examples_SRCS "*.cpp")
  2. add_custom_target(unsupported_examples)
  3. include_directories(../../../unsupported ../../../unsupported/test)
  4. foreach(example_src ${examples_SRCS})
  5. get_filename_component(example ${example_src} NAME_WE)
  6. add_executable(example_${example} ${example_src})
  7. if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
  8. target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
  9. endif()
  10. add_custom_command(
  11. TARGET example_${example}
  12. POST_BUILD
  13. COMMAND example_${example}
  14. ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
  15. )
  16. add_dependencies(unsupported_examples example_${example})
  17. endforeach(example_src)
  18. if(EIGEN_TEST_SYCL)
  19. add_subdirectory(SYCL)
  20. endif(EIGEN_TEST_SYCL)