diff options
author | Himanshi Kalra <himanshikalra98@gmail.com> | 2021-07-26 15:15:52 +0300 |
---|---|---|
committer | Himanshi Kalra <himanshikalra98@gmail.com> | 2021-07-26 15:15:52 +0300 |
commit | 5fc1779b653fefa17ba8dbcf12c68f788004062e (patch) | |
tree | e610ca203fd2b319d93933c4744228df7f8b68a2 | |
parent | b8f3df9817970e615fd9fadb90cb26e73dc8374f (diff) |
CMake: Add directory exists check
-rw-r--r-- | tests/python/CMakeLists.txt | 23 |
1 files changed, 13 insertions, 10 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 1d96968b9b3..49909050ec4 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -748,16 +748,19 @@ set(geo_node_tests ) foreach(geo_node_test ${geo_node_tests}) - - file(GLOB files "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/*.blend") - foreach(file ${files}) - get_filename_component(filename ${file} NAME_WE) - add_blender_test( - geo_node_${geo_node_test}_test_${filename} - ${file} - --python ${TEST_PYTHON_DIR}/geo_node_test.py - ) - endforeach() + if(EXISTS "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/") + file(GLOB files "${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/*.blend") + foreach(file ${files}) + get_filename_component(filename ${file} NAME_WE) + add_blender_test( + geo_node_${geo_node_test}_test_${filename} + ${file} + --python ${TEST_PYTHON_DIR}/geo_node_test.py + ) + endforeach() + else() + MESSAGE(STATUS "No directory called ${TEST_SRC_DIR}/modeling/geometry_nodes/${geo_node_test}/ found!") + endif() endforeach() if(WITH_OPENGL_DRAW_TESTS) |