From e4858023be33ad1b5e1a43b91c1b5e2d6251b8ea Mon Sep 17 00:00:00 2001 From: Paweł Bylica Date: Tue, 25 Aug 2015 15:38:41 +0200 Subject: Fix "add_sources" cmake macro. --- test/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/CMakeLists.txt') diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index a7e27414..25120c89 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -2,8 +2,10 @@ cmake_policy(SET CMP0015 NEW) aux_source_directory(. SRC_LIST) +get_filename_component(TESTS_DIR "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) + macro (add_sources) - file (RELATIVE_PATH _relPath "${CMAKE_SOURCE_DIR}/test" "${CMAKE_CURRENT_SOURCE_DIR}") + file (RELATIVE_PATH _relPath ${TESTS_DIR} ${CMAKE_CURRENT_SOURCE_DIR}) foreach (_src ${ARGN}) if (_relPath) list (APPEND SRC "${_relPath}/${_src}") -- cgit