1 function(TARGET_SUPPORTS_SYMBOLIC_LINK)
2 get_filename_component(name ${CMAKE_CURRENT_LIST_FILE} NAME)
3 execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink
4 ${CMAKE_CURRENT_LIST_FILE} ${CMAKE_CURRENT_BINARY_DIR}/${name}
5 ERROR_QUIET RESULT_VARIABLE result
8 set(TARGET_SUPPORTS_SYMBOLIC_LINK 1 CACHE INTERNAL "Test TARGET_SUPPORTS_SYMBOLIC_LINK")
10 set(TARGET_SUPPORTS_SYMBOLIC_LINK 0 CACHE INTERNAL "Test TARGET_SUPPORTS_SYMBOLIC_LINK")
12 file(REMOVE ${CMAKE_CURRENT_BINARY_DIR}/${name})
14 if(NOT DEFINED TARGET_SUPPORTS_SYMBOLIC_LINK)
15 TARGET_SUPPORTS_SYMBOLIC_LINK()