diff --git a/cmake/nuttx_create_symlink.cmake b/cmake/nuttx_create_symlink.cmake index 08191f1f1cf..4cbaa5c0daa 100644 --- a/cmake/nuttx_create_symlink.cmake +++ b/cmake/nuttx_create_symlink.cmake @@ -25,6 +25,12 @@ function(nuttx_create_symlink old new) "MSYS|CYGWIN|Windows") execute_process(COMMAND ${CMAKE_COMMAND} -E copy_directory ${old} ${new}) else() + # https://cmake.org/cmake/help/latest/policy/CMP0205.html + cmake_policy(PUSH) + if(POLICY CMP0205) + cmake_policy(SET CMP0205 NEW) + endif() file(CREATE_LINK ${old} ${new} COPY_ON_ERROR SYMBOLIC) + cmake_policy(POP) endif() endfunction()