diff --git a/CMakeLists.txt b/CMakeLists.txt index 28e37f4b..ece98018 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -682,6 +682,10 @@ endmacro() #------------------------------------------------------------------------------- # Build targets +if (NOT NO_TEST) + enable_testing() +endif() + add_subdirectory(opensubdiv) if (NOT ANDROID AND NOT IOS) # XXXdyu diff --git a/examples/glImaging/CMakeLists.txt b/examples/glImaging/CMakeLists.txt index 17daa64b..d49ab8a3 100644 --- a/examples/glImaging/CMakeLists.txt +++ b/examples/glImaging/CMakeLists.txt @@ -73,3 +73,5 @@ target_link_libraries(glImaging ) install(TARGETS glImaging DESTINATION "${CMAKE_BINDIR_BASE}") + +add_test(glImaging ${EXECUTABLE_OUTPUT_PATH}/glImaging -w test -l 3 -s 256 256 -a) diff --git a/regression/far_regression/CMakeLists.txt b/regression/far_regression/CMakeLists.txt index 3c7c267a..93c330fc 100644 --- a/regression/far_regression/CMakeLists.txt +++ b/regression/far_regression/CMakeLists.txt @@ -42,3 +42,5 @@ _add_executable(far_regression install(TARGETS far_regression DESTINATION "${CMAKE_BINDIR_BASE}") +add_test(far_regression ${EXECUTABLE_OUTPUT_PATH}/far_regression) + diff --git a/regression/osd_regression/CMakeLists.txt b/regression/osd_regression/CMakeLists.txt index 46928b6b..e6555326 100644 --- a/regression/osd_regression/CMakeLists.txt +++ b/regression/osd_regression/CMakeLists.txt @@ -62,3 +62,5 @@ target_link_libraries(osd_regression ) install(TARGETS osd_regression DESTINATION "${CMAKE_BINDIR_BASE}") + +add_test(osd_regression ${EXECUTABLE_OUTPUT_PATH}/osd_regression) diff --git a/tutorials/far/CMakeLists.txt b/tutorials/far/CMakeLists.txt index 039ce2b8..02f685d4 100644 --- a/tutorials/far/CMakeLists.txt +++ b/tutorials/far/CMakeLists.txt @@ -39,6 +39,8 @@ foreach(tutorial ${TUTORIALS}) list(APPEND TUTORIAL_TARGETS "far_${tutorial}") + add_test(far_${tutorial} ${EXECUTABLE_OUTPUT_PATH}/far_${tutorial}) + endforeach() add_custom_target(far_tutorials DEPENDS ${TUTORIAL_TARGETS})