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

Added option to create links of scripts in installation #910

Draft
wants to merge 2 commits into
base: devel
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 11 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,17 @@ option(XMIPP_USE_CUDA "Compile CUDA programs" ON)
option(XMIPP_USE_MPI "Compile MPI programs" ON)
option(XMIPP_USE_MATLAB "Compile MATLAB binding" ON)
option(XMIPP_LINK_TO_SCIPION "Link to scipion3" ON)
option(XMIPP_SAVE_VERSIONS "Save versions.txt with dependency versions" ON)
option(XMIPP_SAVE_VERSIONS "Save versions.txt with dependency versions." ON)
option(XMIPP_SYMLINK_SCRIPTS "Create symbolic links of scripts instead of copying them. Requires CMake 3.22 or greater" OFF)

# Set file install mode
if(${XMIPP_SYMLINK_SCRIPTS})
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.22")
set(CMAKE_INSTALL_MODE SYMLINK_OR_COPY)
else()
message(WARNING "Option to create symbolic links for sources was enabled but CMake version is incompatible. Please consider updating it to 3.22 or greater")
endif()
endif()

# Avoid installing to lib64 directory
set(CMAKE_INSTALL_LIBDIR lib)
Expand Down
4 changes: 3 additions & 1 deletion installer/constants/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@
__CUDA_CXX = 'CMAKE_CUDA_HOST_COMPILER'
MATLAB = 'XMIPP_USE_MATLAB'
LINK_SCIPION = 'XMIPP_LINK_TO_SCIPION'
SYMLINK_SCRIPTS = 'XMIPP_SYMLINK_SCRIPTS'
__BUILD_TESTING = 'BUILD_TESTING'
__SKIP_RPATH='CMAKE_SKIP_RPATH'

Expand All @@ -62,7 +63,7 @@
COMPILATION_FLAGS = 'flags'
CONFIG_VARIABLES = {
TOGGLES: [
__SEND_INSTALLATION_STATISTICS, CUDA, MPI, MATLAB, LINK_SCIPION, __BUILD_TESTING, __SKIP_RPATH
__SEND_INSTALLATION_STATISTICS, CUDA, MPI, MATLAB, LINK_SCIPION, SYMLINK_SCRIPTS, __BUILD_TESTING, __SKIP_RPATH
],
LOCATIONS: [
CMAKE, CC, CXX, CMAKE_INSTALL_PREFIX, __PREFIX_PATH, __MPI_HOME,
Expand Down Expand Up @@ -105,6 +106,7 @@ def __getPrefixPath() -> Optional[str]:
__CUDA_CXX: None,
MATLAB: ON,
LINK_SCIPION: ON,
SYMLINK_SCRIPTS: OFF,
__BUILD_TESTING: ON,
__SKIP_RPATH: ON
}
Expand Down