I tried to install libspimage on a new computer but got an error I haven’t seen before (I have used cmake 3.2.3 before, now I installed cmake 3.9.0 from brew). It seems to be related to some new CMake policy related to RPATH:
https://cmake.org/cmake/help/v3.9/policy/CMP0068.html
Have you seen this before? I tried to set the INSTALL_NAME_DIR explicitly in the RPATH part (see starred ** rows below) of /libspimage/CMakeLists.txt, but no luck so far.
Any idea how to solve it?
Cheers,
Jonas
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
IF(APPLE)
# There's a problem with install_name_tool which cannot
# handle duplicate rpaths, so we'll take the calculated risk
# of not including rpaths in the build on macosx
SET(CMAKE_SKIP_BUILD_RPATH TRUE)
**SET(INSTALL_NAME_DIR "")**
ELSE(APPLE)
SET(CMAKE_SKIP_BUILD_RPATH FALSE)
ENDIF(APPLE)
# add the automatically determined parts of the RPATH
# which point to directories outside the build tree to the install RPATH
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
# the RPATH to be used when installing, but only if it's not a system directory
LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}" isSystemDir)
IF("${isSystemDir}" STREQUAL "-1")
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}")
**SET(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIBRARY_SUFFIX}")**
ENDIF("${isSystemDir}" STREQUAL "-1")
When pressing g in ccmake:
CMake Warning (dev):
Policy CMP0068 is not set: RPATH settings on macOS do not affect
install_name. Run "cmake --help-policy CMP0068" for policy details. Use
the cmake_policy command to set the policy and suppress this warning.
For compatibility with older versions of CMake, the install_name fields for
the following targets are still affected by RPATH settings:
_spimage_pybackend
spimage
This warning is for project developers. Use -Wno-dev to suppress it.
When compiling library with make:
src/CMakeFiles/_spimage_pybackend.dir/flags.make:10: *** multiple target patterns. Stop.
make[1]: *** [src/CMakeFiles/_spimage_pybackend.dir/all] Error 2
make: *** [all] Error 2
I tried to install libspimage on a new computer but got an error I haven’t seen before (I have used cmake 3.2.3 before, now I installed cmake 3.9.0 from brew). It seems to be related to some new CMake policy related to
RPATH:https://cmake.org/cmake/help/v3.9/policy/CMP0068.html
Have you seen this before? I tried to set the
INSTALL_NAME_DIRexplicitly in theRPATHpart (see starred ** rows below) of/libspimage/CMakeLists.txt, but no luck so far.Any idea how to solve it?
Cheers,
Jonas
When pressing
ginccmake:When compiling library with
make:src/CMakeFiles/_spimage_pybackend.dir/flags.make:10: *** multiple target patterns. Stop.
make[1]: *** [src/CMakeFiles/_spimage_pybackend.dir/all] Error 2
make: *** [all] Error 2