file(GLOB TEST_OPS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "test_*.py") string(REPLACE ".py" "" TEST_OPS "${TEST_OPS}") # default test if(NOT APPLE) foreach(src ${TEST_OPS}) py_test(${src} SRCS ${src}.py) endforeach() else() foreach(src ${TEST_OPS}) if(${src} STREQUAL "test_recognize_digits_conv") message(WARNING "These tests has been disabled in OSX for random fail: \n" ${src}) else() py_test(${src} SRCS ${src}.py) endif() endforeach() endif()