summaryrefslogtreecommitdiff
path: root/cmake/helpers/EflMacros.cmake
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 10:34:58 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2017-01-27 10:34:58 -0200
commitaea33c274a3ccf96f813411e5ccfb8279cbd6c7a (patch)
treec94c4afdf9458d05ba3cec2d52c22ea39d567f18 /cmake/helpers/EflMacros.cmake
parent361fe9603fdd3d7b8b84b36d6b4e2babab3e7586 (diff)
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.
Diffstat (limited to '')
-rw-r--r--cmake/helpers/EflMacros.cmake7
1 files changed, 7 insertions, 0 deletions
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)
1188 set(_testbindir "${EFL_TESTS_BINARY_DIR}") 1188 set(_testbindir "${EFL_TESTS_BINARY_DIR}")
1189 set(_testtarget "${EFL_LIB_CURRENT}-test") # otherwise target would exist 1189 set(_testtarget "${EFL_LIB_CURRENT}-test") # otherwise target would exist
1190 set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible 1190 set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible
1191 elseif(_testname STREQUAL "suite")
1192 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}")
1193 set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}")
1194 set(_testtarget "${EFL_LIB_CURRENT}-test") # target for main test, as above
1195 set(OUTPUT_NAME "${EFL_LIB_CURRENT}_suite") # backward compatible
1191 else() 1196 else()
1192 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}") 1197 set(_testsrcdir "${EFL_TESTS_SOURCE_DIR}/${_testname}")
1193 set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}") 1198 set(_testbindir "${EFL_TESTS_BINARY_DIR}/${_testname}")
@@ -1226,6 +1231,8 @@ function(EFL_TEST _testname)
1226 target_include_directories(${_testtarget} PRIVATE 1231 target_include_directories(${_testtarget} PRIVATE
1227 ${_testsrcdir} 1232 ${_testsrcdir}
1228 ${_testbindir} 1233 ${_testbindir}
1234 ${EFL_TESTS_SOURCE_DIR}
1235 ${EFL_TESTS_BINARY_DIR}
1229 ${INCLUDE_DIRECTORIES}) 1236 ${INCLUDE_DIRECTORIES})
1230 target_include_directories(${_testtarget} SYSTEM PRIVATE 1237 target_include_directories(${_testtarget} SYSTEM PRIVATE
1231 ${SYSTEM_INCLUDE_DIRECTORIES} 1238 ${SYSTEM_INCLUDE_DIRECTORIES}