From d18457a2d0021851dfe7f16066f14de8c1d78230 Mon Sep 17 00:00:00 2001 From: Greg Sjaardema Date: Tue, 6 Nov 2018 10:11:57 -0700 Subject: [PATCH] RPATH handling is not needed for archive library If not building shared libraries, then the RPATH handling should not be specified. Although ignored on some compilers, the CRAY / Intel compiler will error out when installing the NetCDF executables if the RPATH settings are enabled. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 19785b073..3c6db123d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -273,7 +273,7 @@ SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_SOURCE_DIR}/libsrc) # Configuration for post-install RPath # Adapted from http://www.cmake.org/Wiki/CMake_RPATH_handling ## -IF(NOT MSVC) +IF(NOT MSVC AND BUILD_SHARED_LIBS) # use, i.e. don't skip the full RPATH for the build tree SET(CMAKE_SKIP_BUILD_RPATH FALSE)