Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
try to fix how we deal with rpath on binaries
authorMartin Quinson <martin.quinson@loria.fr>
Mon, 4 Jun 2018 20:43:50 +0000 (22:43 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Mon, 4 Jun 2018 20:43:50 +0000 (22:43 +0200)
tools/cmake/Distrib.cmake
tools/cmake/MakeLib.cmake

index 3edfb36..486b809 100644 (file)
@@ -13,7 +13,6 @@ if(enable_smpi)
     ${CMAKE_BINARY_DIR}/bin/smpicc
     ${CMAKE_BINARY_DIR}/bin/smpicxx
     ${CMAKE_BINARY_DIR}/bin/smpirun
     ${CMAKE_BINARY_DIR}/bin/smpicc
     ${CMAKE_BINARY_DIR}/bin/smpicxx
     ${CMAKE_BINARY_DIR}/bin/smpirun
-    ${CMAKE_BINARY_DIR}/bin/smpimain
     DESTINATION bin/)
   if(SMPI_FORTRAN)
     install(PROGRAMS
     DESTINATION bin/)
   if(SMPI_FORTRAN)
     install(PROGRAMS
@@ -26,12 +25,6 @@ if(enable_smpi)
   endif()
 endif()
 
   endif()
 endif()
 
-if(enable_model-checking)
-  install(
-    PROGRAMS ${CMAKE_BINARY_DIR}/bin/simgrid-mc
-    DESTINATION bin/)
-endif()
-
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh  DESTINATION bin/)
 
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/graphicator  DESTINATION bin/)
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/tesh  DESTINATION bin/)
 
 install(PROGRAMS ${CMAKE_BINARY_DIR}/bin/graphicator  DESTINATION bin/)
index b6af7e7..c86e846 100644 (file)
@@ -1,7 +1,7 @@
 ### Make Libs
 
 # On Mac OSX, specify that rpath is useful to look for the dependencies
 ### Make Libs
 
 # On Mac OSX, specify that rpath is useful to look for the dependencies
-# See https://cmake.org/Wiki/CMake_RPATH_handling and Java.cmake
+# See https://gitlab.kitware.com/cmake/community/wikis/doc/cmake/RPATH-handling and Java.cmake
 set(MACOSX_RPATH ON)
 if(APPLE)
   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # When installed, use system path
 set(MACOSX_RPATH ON)
 if(APPLE)
   SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) # When installed, use system path
@@ -33,7 +33,8 @@ if(enable_model-checking)
                         PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
   set_property(TARGET simgrid-mc
                APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
                         PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
   set_property(TARGET simgrid-mc
                APPEND PROPERTY INCLUDE_DIRECTORIES "${INTERNAL_INCLUDES}")
-
+  install(TARGETS simgrid-mc # install that binary without breaking the rpath on Mac
+    RUNTIME DESTINATION bin/)      
 endif()
 
 
 endif()
 
 
@@ -91,6 +92,8 @@ if(enable_smpi)
   target_link_libraries(smpimain simgrid)
   set_target_properties(smpimain
     PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
   target_link_libraries(smpimain simgrid)
   set_target_properties(smpimain
     PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
+  install(TARGETS smpimain # install that binary without breaking the rpath on Mac
+    RUNTIME DESTINATION bin/)      
 endif()
 
 if(enable_smpi AND APPLE)
 endif()
 
 if(enable_smpi AND APPLE)