Skip to content

Commit

Permalink
Merge pull request #789 from bareos/dev/pstorz/master/cmake-speedup-s…
Browse files Browse the repository at this point in the history
…ymlinks

cmake: speedup symlink creation on cmake >=3.14
  • Loading branch information
pstorz committed Apr 6, 2021
2 parents 8870f3c + 1c65ea9 commit 9b731a7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion systemtests/CMakeLists.txt
Expand Up @@ -332,7 +332,13 @@ macro(prepare_test)
endmacro()

macro(create_symlink target link)
execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ${target} ${link})
if(CMAKE_VERSION VERSION_GREATER_EQUAL "3.14")
file(CREATE_LINK ${target} ${link} SYMBOLIC)
else()
execute_process(
COMMAND ${CMAKE_COMMAND} -E create_symlink ${target} ${link}
)
endif()
endmacro()

# Main starts here...
Expand Down

0 comments on commit 9b731a7

Please sign in to comment.