Home | History | Annotate | Download | only in examples
      1 FILE(GLOB examples_SRCS "*.cpp")
      2 
      3 ADD_CUSTOM_TARGET(unsupported_examples)
      4 
      5 INCLUDE_DIRECTORIES(../../../unsupported ../../../unsupported/test)
      6 
      7 FOREACH(example_src ${examples_SRCS})
      8   GET_FILENAME_COMPONENT(example ${example_src} NAME_WE)
      9   ADD_EXECUTABLE(example_${example} ${example_src})
     10   if(EIGEN_STANDARD_LIBRARIES_TO_LINK_TO)
     11     target_link_libraries(example_${example} ${EIGEN_STANDARD_LIBRARIES_TO_LINK_TO})
     12   endif()
     13   GET_TARGET_PROPERTY(example_executable
     14                       example_${example} LOCATION)
     15   ADD_CUSTOM_COMMAND(
     16     TARGET example_${example}
     17     POST_BUILD
     18     COMMAND ${example_executable}
     19     ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
     20   )
     21   ADD_DEPENDENCIES(unsupported_examples example_${example})
     22 ENDFOREACH(example_src)
     23