aboutsummaryrefslogtreecommitdiffhomepage
path: root/unsupported/doc/examples/CMakeLists.txt
blob: cb42b2ab9c45de8543ea1a2938732241e1d9fca2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
FILE(GLOB examples_SRCS "*.cpp")

ADD_CUSTOM_TARGET(unsupported_examples)

FOREACH(example_src ${examples_SRCS})
GET_FILENAME_COMPONENT(example ${example_src} NAME_WE)
ADD_EXECUTABLE(example_${example} ${example_src})
GET_TARGET_PROPERTY(example_executable
                    example_${example} LOCATION)
ADD_CUSTOM_COMMAND(
  TARGET example_${example}
  POST_BUILD
  COMMAND ${example_executable}
  ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out
)
ADD_DEPENDENCIES(unsupported_examples example_${example})
ENDFOREACH(example_src)