Fix out-of-tree testing symlinks on Windows

This commit is contained in:
Darryl Green 2018-06-07 11:55:50 +01:00 committed by Simon Butcher
parent ee3a3d4a72
commit 215a40631f

View file

@ -67,7 +67,11 @@ function(link_to_source base_name)
if (CMAKE_HOST_UNIX)
set(command ln -s ${target} ${link})
else()
set(command cmd.exe /c mklink /j ${link} ${target})
if (IS_DIRECTORY ${target})
set(command cmd.exe /c mklink /j ${link} ${target})
else()
set(command cmd.exe /c mklink ${link} ${target})
endif()
endif()
execute_process(COMMAND ${command}