From 0f6f37a571ab0fcb1cd3309150f9ae9ade18b74e Mon Sep 17 00:00:00 2001 From: Marcel Loose <loose@astron.nl> Date: Thu, 2 Jun 2016 15:09:39 +0000 Subject: [PATCH] Task #8021: Added check for existing target to lofar_create_target_symlink() --- CMake/LofarMacros.cmake | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMake/LofarMacros.cmake b/CMake/LofarMacros.cmake index a0de05215df..58b58ba135a 100644 --- a/CMake/LofarMacros.cmake +++ b/CMake/LofarMacros.cmake @@ -213,6 +213,10 @@ if(NOT DEFINED LOFAR_MACROS_INCLUDED) # use of the generator expression $<TARGET_FILE>. # -------------------------------------------------------------------------- macro(lofar_create_target_symlink _target _symlink) + if(NOT TARGET _target) + message(SEND_ERROR + "Cannot create symbolic link to non-existing target ${_target}") + endif(NOT TARGET _target) if(POLICY CMP0026) set(_location $<TARGET_FILE:${_target}>) else(POLICY CMP0026) -- GitLab