From 4544702fbc21b561345c57ca7c40c4e69cfad22f Mon Sep 17 00:00:00 2001 From: Andrej Rode <mail@andrejro.de> Date: Fri, 21 Sep 2018 14:37:54 -0700 Subject: cmake: adhere to the new behaviour of CMP0026 policy Previously the LOCATION property was used in several places through the tree. The Generator Syntax $<TARGET_FILE:tgt> has to be used now instead. This helps cmake figuring out the right file path. --- gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'gr-utils/python') diff --git a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake index 9500fa0a4a..eee601a791 100644 --- a/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake +++ b/gr-utils/python/modtool/gr-newmod/cmake/Modules/GrTest.cmake @@ -43,12 +43,9 @@ function(GR_ADD_TEST test_name) #we must manually set them in the PATH to run tests. #The following appends the path of a target dependency. foreach(target ${GR_TEST_TARGET_DEPS}) - get_target_property(location ${target} LOCATION) - if(location) - get_filename_component(path ${location} PATH) - string(REGEX REPLACE "\\$\\(.*\\)" "${CMAKE_BUILD_TYPE}" path "${path}") - list(APPEND GR_TEST_LIBRARY_DIRS ${path}) - endif(location) + get_filename_component(path $<TARGET_FILE:$target> PATH) + string(REGEX REPLACE "\\$\\(.*\\)" "${CMAKE_BUILD_TYPE}" path "${path}") + list(APPEND GR_TEST_LIBRARY_DIRS ${path}) endforeach(target) if(WIN32) -- cgit v1.2.3