Add BVH module in unsupported (patch from Ilya Baran)

(I thought I committed it a week ago but it seems the command failed)
This commit is contained in:
Gael Guennebaud
2009-03-18 20:06:06 +00:00
parent 3d385ae968
commit 4bb5221d22
19 changed files with 952 additions and 6 deletions

View File

@@ -0,0 +1,25 @@
FILE(GLOB snippets_SRCS "*.cpp")
ADD_CUSTOM_TARGET(unsupported_snippets)
FOREACH(snippet_src ${snippets_SRCS})
GET_FILENAME_COMPONENT(snippet ${snippet_src} NAME_WE)
SET(compile_snippet_target compile_${snippet})
SET(compile_snippet_src ${compile_snippet_target}.cpp)
FILE(READ ${snippet_src} snippet_source_code)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/doc/compile_snippet.cpp.in
${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})
ADD_EXECUTABLE(${compile_snippet_target}
${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src})
GET_TARGET_PROPERTY(compile_snippet_executable
${compile_snippet_target} LOCATION)
ADD_CUSTOM_COMMAND(
TARGET ${compile_snippet_target}
POST_BUILD
COMMAND ${compile_snippet_executable}
ARGS >${CMAKE_CURRENT_BINARY_DIR}/${snippet}.out
)
ADD_DEPENDENCIES(unsupported_snippets ${compile_snippet_target})
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/${compile_snippet_src}
PROPERTIES OBJECT_DEPENDS ${snippet_src})
ENDFOREACH(snippet_src)