diff --git a/CEP/MS/test/CMakeLists.txt b/CEP/MS/test/CMakeLists.txt index e78b99e1b3e69eb478b245bf3c21369c4087a781..fed5c8da22a5b3510ee917f9796212b2073e4f01 100644 --- a/CEP/MS/test/CMakeLists.txt +++ b/CEP/MS/test/CMakeLists.txt @@ -3,13 +3,11 @@ include(LofarCTest) # Create symbolic links to scripts used by the tmakems test script. -get_target_property(_loc getparsetvalue LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} +lofar_create_target_symlink( + getparsetvalue ${CMAKE_CURRENT_BINARY_DIR}/getparsetvalue) -get_target_property(_loc finddproc LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} +lofar_create_target_symlink( + finddproc ${CMAKE_CURRENT_BINARY_DIR}/finddproc) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${LMWCommon_SOURCE_DIR}/src/startdistproc diff --git a/CEP/ParmDB/test/CMakeLists.txt b/CEP/ParmDB/test/CMakeLists.txt index 3b0477c16893e9ac6e09ee11de80f3c4c95f571f..b161005a2f3f9c9b44b210629acbbb33f0aa7232 100644 --- a/CEP/ParmDB/test/CMakeLists.txt +++ b/CEP/ParmDB/test/CMakeLists.txt @@ -3,13 +3,11 @@ include(LofarCTest) # Create symbolic links to scripts used by some of the test programs -get_target_property(_loc getparsetvalue LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} +lofar_create_target_symlink( + getparsetvalue ${CMAKE_CURRENT_BINARY_DIR}/getparsetvalue) -get_target_property(_loc finddproc LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} +lofar_create_target_symlink( + finddproc ${CMAKE_CURRENT_BINARY_DIR}/finddproc) execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${LMWCommon_SOURCE_DIR}/src/startdistproc diff --git a/CEP/pyparmdb/test/CMakeLists.txt b/CEP/pyparmdb/test/CMakeLists.txt index a1899ef713aebdc2e5e3072eb01574e5de6f0b63..81a127052e63f175dc75807b90707a4deae4980d 100644 --- a/CEP/pyparmdb/test/CMakeLists.txt +++ b/CEP/pyparmdb/test/CMakeLists.txt @@ -4,9 +4,8 @@ include(LofarCTest) # We need to create a symlink to the parmdbm executable in the current # binary directory, so that the test program(s) can find it. -get_target_property(_parmdbm parmdbm LOCATION_${CMAKE_BUILD_TYPE}) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_parmdbm} +lofar_create_target_symlink( + parmdbm ${CMAKE_CURRENT_BINARY_DIR}/parmdbm) lofar_add_test(tpyparmdb DEPENDS parmdbm _parmdb) diff --git a/CMake/LofarMacros.cmake b/CMake/LofarMacros.cmake index 811d454eb9e7015bd1bb9498fe025e7cd18aad99..0c6efabf453f15cf7d32eded78f152f92377be63 100644 --- a/CMake/LofarMacros.cmake +++ b/CMake/LofarMacros.cmake @@ -184,11 +184,11 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) else(POLICY CMP0026) get_target_property(_location ${_target} LOCATION) endif(POLICY CMP0026) - add_custom_target(${_target}_symlink ALL + add_custom_target(${PACKAGE_NAME}_${_target}_symlink ALL COMMAND ${CMAKE_COMMAND} -E create_symlink ${_location} ${_symlink}) - add_dependencies(${_target}_symlink ${_target}) + add_dependencies(${PACKAGE_NAME}_${_target}_symlink ${_target}) endmacro(lofar_create_target_symlink _target _symlink) diff --git a/RTCP/Cobalt/CobaltTest/test/CMakeLists.txt b/RTCP/Cobalt/CobaltTest/test/CMakeLists.txt index 060158b9e2a03e1ec57ada9a212795b11d15d5ad..61ec8cddeeb0935d7d62404d64898ff029600c66 100644 --- a/RTCP/Cobalt/CobaltTest/test/CMakeLists.txt +++ b/RTCP/Cobalt/CobaltTest/test/CMakeLists.txt @@ -3,9 +3,8 @@ include(LofarCTest) # Create symbolic link to the outputProc executable used by the tests below. -get_target_property(_loc outputProc LOCATION) -execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${_loc} +lofar_create_target_symlink( + outputProc ${CMAKE_CURRENT_BINARY_DIR}/outputProc) foreach(_test tMultiPartTABOutput tManyPartTABOutput) @@ -15,4 +14,3 @@ foreach(_test tMultiPartTABOutput tManyPartTABOutput) PROPERTIES ENVIRONMENT "LOFARROOT=${GPUProc_SOURCE_DIR}") endif(BUILD_TESTING) endforeach() -