summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 13:56:49 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-26 14:23:24 -0200
commitf4744e1d2a6cb1698400dd9922edaf7ac56d100d (patch)
tree6422ae2f639e02c17e7149d929cd776063569900 /cmake/helpers/EflMacros.cmake
parent51307b7cdc0cc45442bf88d5cd772752910bbb09 (diff)
cmake: auto-detect tests in src/tests/libname if no CMakeLists.txt
previously we were only auto-detecting sources in src/tests/libname/ subdirectories, but we should also check the parent directory if no subdirectories were processed.
Diffstat (limited to '')
-rw-r--r--cmake/helpers/EflMacros.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake
index fa647508b5..098d229165 100644
--- a/cmake/helpers/EflMacros.cmake
+++ b/cmake/helpers/EflMacros.cmake
@@ -733,6 +733,10 @@ function(_EFL_LIB_PROCESS_TESTS_INTERNAL)
733 endforeach() 733 endforeach()
734 endif() 734 endif()
735 735
736 if(NOT ${EFL_LIB_CURRENT}_TESTS AND EXISTS ${EFL_TESTS_SOURCE_DIR} AND NOT EXISTS ${EFL_TESTS_SOURCE_DIR}/CMakeLists.txt)
737 EFL_TEST(${EFL_LIB_CURRENT})
738 endif()
739
736 if(${EFL_LIB_CURRENT}_TESTS) 740 if(${EFL_LIB_CURRENT}_TESTS)
737 add_custom_target(${EFL_LIB_CURRENT}-tests DEPENDS ${${EFL_LIB_CURRENT}_TESTS}) 741 add_custom_target(${EFL_LIB_CURRENT}-tests DEPENDS ${${EFL_LIB_CURRENT}_TESTS})
738 LIST_APPEND_GLOBAL(EFL_ALL_TESTS ${EFL_LIB_CURRENT}-tests) 742 LIST_APPEND_GLOBAL(EFL_ALL_TESTS ${EFL_LIB_CURRENT}-tests)