patrickelectric opened a new pull request, #18964:
URL: https://github.com/apache/nuttx/pull/18964

   ## Summary
   
   Fix compilation warning when running cmake 4.1
   
   ## Impact
   
   Remove an annoying compilation warning when using the project as a submodule
   
   ## Testing
   
   Before:
   ```
   CMake Warning (dev) at cmake/nuttx_create_symlink.cmake:28 (file):
     Path
   
       /Users/patrick/git/blue/pequod/lib/nuttx/arch/arm/src/stm32h5
   
     is directory.  It will be copied recursively when NEW policy behavior
     applies for CMP0205.
   
     Policy CMP0205 is not set: file(CREATE_LINK) with COPY_ON_ERROR copies
     directory content.  Run "cmake --help-policy CMP0205" for policy details.
     Use the cmake_policy command to set the policy and suppress this warning.
   Call Stack (most recent call first):
     CMakeLists.txt:335 (nuttx_create_symlink)
   This warning is for project developers.  Use -Wno-dev to suppress it.
   ```
   
   After:
   ```
   # No more warning
   ```
   
   Bonus points:
   ```
   cmake --help-policy CMP0205
   CMP0205
   -------
   
   .. versionadded:: 4.3
   
   ``file(CREATE_LINK)`` with ``COPY_ON_ERROR`` copies directory content.
   
   The ``file(CREATE_LINK)`` command's ``COPY_ON_ERROR`` option copies
   the source file to the destination as a fallback if linking it fails.
   If the source is a directory, CMake 4.2 and below create the destination
   directory but do not copy its contents.  CMake 4.3 and above prefer to
   copy the directory contents too.  This policy provides compatibility with
   projects that have not been updated to expect the contents to be copied.
   
   The ``OLD`` behavior for this policy is to create the destination directory
   without copying contents.  The ``NEW`` behavior for this policy to create
   the destination directory and copy contents from the source directory.
   
   This policy was introduced in CMake version 4.3.
   It may be set by ``cmake_policy()`` or ``cmake_minimum_required()``.
   If it is not set, CMake warns, and uses ``OLD`` behavior.
   
   .. note::
     The ``OLD`` behavior of a policy is
     :ref:`deprecated by definition <cmake-policies-intro>`
     and may be removed in a future version of CMake.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to