From edf1a1e9c15edc14a31bb5b3d49c3d910443d134 Mon Sep 17 00:00:00 2001 From: Gilbert Lee Date: Fri, 17 May 2019 17:13:40 +0000 Subject: [PATCH] Adding check for chrpath for unit tests [ROCm/rccl commit: 248e1d61cc5e6f39c439a3beb481899ab374e3a6] --- projects/rccl/test/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/projects/rccl/test/CMakeLists.txt b/projects/rccl/test/CMakeLists.txt index 1af7886276..452cb4fd06 100644 --- a/projects/rccl/test/CMakeLists.txt +++ b/projects/rccl/test/CMakeLists.txt @@ -4,6 +4,12 @@ if(BUILD_TESTS) message("Going to build unit tests (Installed in /test/UnitTests)") + # chrpath is required to properly set rpath for the UnitTests executable + find_program(CHRPATH chrpath) + if(NOT CHRPATH) + message(FATAL_ERROR "chrpath is required for UnitTests. Please install (e.g. sudo apt-get install chrpath)") + endif() + # OpenMP is used to drive GPUs (one per thread) find_package(OpenMP REQUIRED) set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")