cmake: nuttx_create_symlink: Remove warning for CMP0205

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2026-05-26 09:03:32 -03:00 committed by Alan C. Assis
parent 9e58127339
commit d37309e8db

View file

@ -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()