From aea33c274a3ccf96f813411e5ccfb8279cbd6c7a Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Fri, 27 Jan 2017 10:34:58 -0200 Subject: [PATCH] cmake/tests: improve naming and add missing include directories. Some tests were relocated to subdirectory but need shared files, or may need files from src/tests by including them relatively (../) as done in ector. With subdirectories we may end with src/test/libname/suite, to make it more user friendly and backward compatible call these libname_suite. --- cmake/helpers/EflMacros.cmake | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/cmake/helpers/EflMacros.cmake b/cmake/helpers/EflMacros.cmake index 5918bfceed..33811ba17b 100644 --- a/cmake/helpers/EflMacros.cmake +++ b/cmake/helpers/EflMacros.cmake @@ -1188,6 +1188,11 @@ function(EFL_TEST _testname) set(_testbindir "${EFL_TESTS_BINARY_DIR}") set(_testtarget "${EFL_LIB_CURRENT}-test") # otherwise target would exist set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible + elseif(_testname STREQUAL "suite") + set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}") + set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}") + set(_testtarget "${EFL_LIB_CURRENT}-test") # target for main test, as above + set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible else() set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}") set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}") @@ -1226,6 +1231,8 @@ function(EFL_TEST _testname) target_include_directories(${_testtarget} PRIVATE ${_testsrcdir} ${_testbindir} + ${EFL_TESTS_SOURCE_DIR} + ${EFL_TESTS_BINARY_DIR} ${INCLUDE_DIRECTORIES}) target_include_directories(${_testtarget} SYSTEM PRIVATE ${SYSTEM_INCLUDE_DIRECTORIES}