Use globbing to add .py test files
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 17 Mar 2016 13:07:57 +0000 (15:07 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Thu, 17 Mar 2016 13:07:57 +0000 (15:07 +0200)
py/CMakeLists.txt

index 1a0738a0a0f7e4e99991610f26f04aae3564986d..f701ef65179e8de96af0504bad8ad9d8b918bcca 100644 (file)
@@ -21,7 +21,8 @@ swig_link_libraries(pykms kms++ kmstest ${LIBDRM_LIBRARIES} ${PYTHON_LIBRARIES})
 # We get some "maybe-uninitialized" warnings from the generated code. I hope they are harmless.
 set_source_files_properties(${swig_generated_file_fullname} PROPERTIES COMPILE_FLAGS "-Wno-maybe-uninitialized")
 
-add_custom_target(pyextras SOURCES test.py functest.py db.py iact.py)
+file(GLOB PY_SRCS "*.py")
+add_custom_target(pyextras SOURCES ${PY_SRCS})
 
 add_test(NAME pytest COMMAND "${CMAKE_CURRENT_SOURCE_DIR}/functest.py")
 set_property(TEST pytest PROPERTY