diff options
author | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-12-21 09:02:24 +0000 |
---|---|---|
committer | Benoit Jacob <jacob.benoit.1@gmail.com> | 2007-12-21 09:02:24 +0000 |
commit | 04e3512eb67259f0e8e39de16ac91af36c3f21f1 (patch) | |
tree | d688441a0eea006cebf832d33a88346c170a0d3c /doc/examples | |
parent | 64f5d5d318d6eafc0ac91e3f4f904b53db86c54f (diff) |
first version of CMakeLists auto-generating examples outputs
Diffstat (limited to 'doc/examples')
-rw-r--r-- | doc/examples/CMakeLists.txt | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/doc/examples/CMakeLists.txt b/doc/examples/CMakeLists.txt new file mode 100644 index 000000000..b0d342a40 --- /dev/null +++ b/doc/examples/CMakeLists.txt @@ -0,0 +1,14 @@ +FILE(GLOB examples_SRCS "*.cpp") + +FOREACH(example_src ${examples_SRCS}) +GET_FILENAME_COMPONENT(example ${example_src} NAME_WE) +ADD_EXECUTABLE(${example} ${example_src}) +GET_TARGET_PROPERTY(example_executable ${example} LOCATION) +ADD_CUSTOM_COMMAND( + TARGET ${example} + POST_BUILD + COMMAND ${example_executable} + ARGS >${CMAKE_CURRENT_BINARY_DIR}/${example}.out +) +MESSAGE(coucou) +ENDFOREACH(example_src) |