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

Conversation

VincentRouvreau
Copy link
Contributor

Fix last issue of #1131 on windows where you need to have admin rights, or in developper mode to be able to make symbolic links.

@VincentRouvreau VincentRouvreau added the build The build system (CMake, etc) label Sep 20, 2024
@@ -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 .

@VincentRouvreau VincentRouvreau added the 3.11.0 GUDHI version 3.11.0 label Sep 24, 2024
@VincentRouvreau VincentRouvreau merged commit 1186510 into GUDHI:master Sep 24, 2024
7 checks passed
@VincentRouvreau VincentRouvreau deleted the symbolic_links_for_setup_py_part2 branch September 24, 2024 06:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.11.0 GUDHI version 3.11.0 build The build system (CMake, etc)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants