Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

copy_on_error if symbolic link failed to be created #1132

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,9 @@ function( add_gudhi_symbolic_links GLOBBING_EXPRESSION )
endif()
file(GLOB GUDHI_GLOB_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${GLOBBING_EXPRESSION})
foreach(GUDHI_GLOB_FILENAME ${GUDHI_GLOB_FILES})
file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_GLOB_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${GUDHI_GLOB_FILENAME}" SYMBOLIC)
# COPY_ON_ERROR is activated because on windows, user needs to be root or in dev mode to be able to make symbolic links
# This case can be problematic, because if you modify the sources, build is still done on the copy
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I was going to ask what happens in that case. I guess the link/copy is done during cmake generation, not during the actual build, so rerunning just make has no chance to redo the copy 😞
Bah, few developers use windows, even fewer will have non-working symlinks, even fewer will want partial rebuilds...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes that's it, you need to cmake each time you do a modification. I was asking myself if we should explain it somewhere .

file(CREATE_LINK "${CMAKE_CURRENT_SOURCE_DIR}/${GUDHI_GLOB_FILENAME}" "${CMAKE_CURRENT_BINARY_DIR}/${GUDHI_GLOB_FILENAME}" COPY_ON_ERROR SYMBOLIC)
endforeach()
endfunction( add_gudhi_symbolic_links )

Expand Down
Loading