[petsc-dev] Curse CMake to the Depths of Hell

Satish Balay balay at mcs.anl.gov
Wed Jan 18 14:18:02 CST 2017


On Wed, 18 Jan 2017, Matthew Knepley wrote:

> On Wed, Jan 18, 2017 at 10:42 AM, Matthew Knepley <knepley at gmail.com> wrote:
> 
> > Yep, I am fixing that too.
> >
> 
> Okay, I fixed the -lrt and commit, but the stuff to fix the shared link did
> not work.
> 
> I pushed knepley/fix-configure-pragmatic. Could you look at it?

Looking at superlu (instead of superlu_dist) - and discarding the
previous change - the following appears to work.

Satish

--------

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4b42eb9..9d63ab4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -128,8 +128,9 @@ if (NOT ENABLE_LIBMESHB OR NOT LIBMESHB_FOUND)
   message(STATUS "Configured without libMeshb support.")
 endif()
 
-
-
+# Make sure libpragmatic.dylib works properly from the prefix location
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
 
 # ADD_EXECUTABLE( ${PROJECT_NAME} main.cpp )
 # TARGET_LINK_LIBRARIES( ${PROJECT_NAME} ${PRAgMaTIc_LIBS} )



More information about the petsc-dev mailing list