mirror of
https://github.com/NGSolve/netgen.git
synced 2025-01-12 22:20:35 +05:00
check for write permissions at INSTALL_DIR on Unix platforms
This commit is contained in:
parent
77dde0977b
commit
d557e59a69
@ -248,11 +248,6 @@ endif(INSTALL_PROFILES)
|
||||
#######################################################################
|
||||
if(INSTALL_DEPENDENCIES)
|
||||
include (InstallRequiredSystemLibraries)
|
||||
# find_library(LIBGOMP NAMES gomp.1)
|
||||
# find_library(LIBSTDCXX NAMES stdc++.6)
|
||||
# find_library(LIBGCCS NAMES gcc_s.1)
|
||||
# install( FILES "${Boost_LIBRARIES}" ${LIBGOMP} ${LIBSTDCXX} ${LIBGCCS} DESTINATION ${ng_install_dir_lib} COMPONENT netgen )
|
||||
# install( FILES "${Boost_LIBRARIES}" DESTINATION ${ng_install_dir_lib} COMPONENT netgen )
|
||||
get_filename_component(MY_LIB_DIR ${TK_LIBRARY} DIRECTORY)
|
||||
if(APPLE)
|
||||
if(TIX_LIBRARY)
|
||||
|
@ -51,6 +51,22 @@ if(APPLE)
|
||||
else(APPLE)
|
||||
set(CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "Prefix prepended to install directories" FORCE)
|
||||
endif(APPLE)
|
||||
if(UNIX)
|
||||
# check for write permissions in install directory
|
||||
execute_process(COMMAND test -w ${INSTALL_DIR} RESULT_VARIABLE res)
|
||||
IF(res)
|
||||
message("No write permissions on install directory ${INSTALL_DIR}")
|
||||
message("The setup routine will now set write permissions by executing following commands, please provide your password when asked for:")
|
||||
message("sudo mkdir -p ${INSTALL_DIR}")
|
||||
message("sudo chown -r $ENV{USER}:$ENV{USER} ${INSTALL_DIR}")
|
||||
execute_process(COMMAND sudo mkdir -p ${INSTALL_DIR})
|
||||
execute_process(COMMAND sudo chown -R $ENV{USER}:$ENV{USER} ${INSTALL_DIR})
|
||||
endif()
|
||||
execute_process(COMMAND test -w ${INSTALL_DIR} RESULT_VARIABLE res)
|
||||
if(res)
|
||||
message(WARNING "still no write access at install directory, please set permissions manually")
|
||||
endif()
|
||||
endif(UNIX)
|
||||
|
||||
if(NOT WIN32)
|
||||
find_package(ZLIB REQUIRED)
|
||||
|
Loading…
Reference in New Issue
Block a user