Skip to content

Commit

Permalink
cmake: speedup symlink creation on cmake >=3.14
Browse files Browse the repository at this point in the history
By using the new file (CREATE_LINK ) available since cmake 3.14, the
configuration time could be reduced by about 33%.
  • Loading branch information
pstorz committed Apr 6, 2021
1 parent 8870f3c commit 1c65ea9
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 1c65ea9

Please sign in to comment.