Skip to content

Commit

Permalink
[noetic-devel][Windows] Fix file COPY cannot read symlink (#1109)
Browse files Browse the repository at this point in the history
* conditionally file copying on Windows.

* fix condition

Co-authored-by: Dirk Thomas <[email protected]>
  • Loading branch information
seanyen and dirk-thomas committed Jul 24, 2020
1 parent 807c983 commit 232339e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmake/catkin_install_python.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,10 @@ function(catkin_install_python signature)
file(MAKE_DIRECTORY ${rewritten_file})
# even though the content of the file is overwritten
# the copy makes sure the file has the right permissions
file(COPY ${source_file} DESTINATION ${rewritten_file} USE_SOURCE_PERMISSIONS)
if(NOT WIN32 OR NOT IS_SYMLINK "${source_file}")
# CMake doesn't support copying symlinks on Windows
file(COPY ${source_file} DESTINATION ${rewritten_file} USE_SOURCE_PERMISSIONS)
endif()
set(rewritten_file "${rewritten_file}/${filename}")
file(WRITE ${rewritten_file} "${data}")
else()
Expand Down

0 comments on commit 232339e

Please sign in to comment.