All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH rdma-core 1/2] buildlib: use cmake to find python
@ 2017-11-13 13:00 Nicolas Morey-Chaisemartin
       [not found] ` <1923c475-0597-a597-36a5-8a33cccae6ef-l3A5Bk7waGM@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas Morey-Chaisemartin @ 2017-11-13 13:00 UTC (permalink / raw)
  To: linux-rdma-u79uwXL29TY76Z2rM5mHXA

Depending on the system, python might not be available as pythomn (but python2, python3, etc.)
Use FIND_PACKAGE to get the right executable.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin-IBi9RG/b67k@public.gmane.org>
---
 CMakeLists.txt                | 3 +++
 buildlib/rdma_functions.cmake | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5e6f245a..a283fba3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -279,6 +279,9 @@ else()
   set(HAVE_FULL_SYMBOL_VERSIONS 1)
 endif()
 
+# Look for Python
+FIND_PACKAGE (PythonInterp)
+
 #-------------------------
 # Find libraries
 # pthread
diff --git a/buildlib/rdma_functions.cmake b/buildlib/rdma_functions.cmake
index d69afd3d..53a978e8 100644
--- a/buildlib/rdma_functions.cmake
+++ b/buildlib/rdma_functions.cmake
@@ -144,7 +144,7 @@ function(rdma_shared_provider DEST VERSION_SCRIPT SOVERSION VERSION)
   install(TARGETS ${DEST} DESTINATION "${CMAKE_INSTALL_LIBDIR}")
 
   # Compute a relative symlink from VERBS_PROVIDER_DIR to LIBDIR
-  execute_process(COMMAND python ${CMAKE_SOURCE_DIR}/buildlib/relpath
+  execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_SOURCE_DIR}/buildlib/relpath
     "${CMAKE_INSTALL_FULL_LIBDIR}/lib${DEST}.so.${VERSION}"
     "${VERBS_PROVIDER_DIR}"
     OUTPUT_VARIABLE DEST_LINK_PATH OUTPUT_STRIP_TRAILING_WHITESPACE
-- 
2.15.0.167.g7819e496d


--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-11-13 19:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-13 13:00 [PATCH rdma-core 1/2] buildlib: use cmake to find python Nicolas Morey-Chaisemartin
     [not found] ` <1923c475-0597-a597-36a5-8a33cccae6ef-l3A5Bk7waGM@public.gmane.org>
2017-11-13 13:33   ` Benjamin Drung
     [not found]     ` <1510580030.4026.10.camel-EIkl63zCoXaH+58JC4qpiA@public.gmane.org>
2017-11-13 13:35       ` Nicolas Morey-Chaisemartin
2017-11-13 19:31   ` Jason Gunthorpe
     [not found]     ` <20171113193139.GN6918-uk2M96/98Pc@public.gmane.org>
2017-11-13 19:56       ` Nicolas Morey-Chaisemartin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.