diff --git a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt index defb297549..2388a6c7de 100755 --- a/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt +++ b/projects/rocr-runtime/rocrtst/suites/test_common/CMakeLists.txt @@ -1,8 +1,3 @@ -# -# Minimum version of cmake required -# -cmake_minimum_required(VERSION 2.8.0) - # # Required Defines on cmake command line # @@ -84,12 +79,8 @@ set (ONLY64STR "64") if (DEFINED LLVM_DIR) set(CLANG ${LLVM_DIR}/clang) if (NOT EXISTS ${CLANG}) - # SPK temp until Jenkins script input is corrected. - set (CLANG ${OPENCL_DIR}/bin/clang) - if (NOT EXISTS ${CLANG}) message("ERROR: path to clang (${CLANG}) is not valid. Is define LLVM_DIR correct?") return() - endif() endif() else() message("WARNING: LLVM_DIR define is not set. Kernels will not be built.") @@ -221,7 +212,6 @@ if(ISDEBUG) endif() MESSAGE("ISDEBUG STEP:Done") - set(ROCRTST_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..) # Set Name for Google Test Framework and build it as a @@ -364,15 +354,25 @@ set(BITCODE_LIBS "${COMMON_BITCODE_LIBS}") set(CL_FILE_LIST "${KERNELS_DIR}/groupMemoryDynamic_kernels.cl") build_sample_for_devices("groupMemoryDynamic") +set(CMAKE_BUILD_WITH_INSTALL_RPATH ON) + # Build rules add_executable(${ROCRTST} ${performanceSources} ${functionalSources} ${negativeSources} ${stressSources} ${common_srcs} ${testCommonSources}) -target_link_libraries(${ROCRTST} ${ROCRTST_LIBS} c stdc++ dl pthread rt numa hwloc) +target_link_libraries(${ROCRTST} ${ROCRTST_LIBS} c stdc++ dl pthread rt numa ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty/libhwloc.so.5) add_custom_target(rocrtst_kernels DEPENDS ${HSACO_TARG_LIST}) + +## Set RUNPATH to pickup local copy of hwloc +set_property(TARGET ${ROCRTST} PROPERTY INSTALL_RPATH "$ORIGIN;$ORIGIN/thirdparty;$ORIGIN/../lib/rocrtst/thirdparty" ) +set_property(TARGET ${ROCRTST} PROPERTY LINK_FLAGS "-Wl,--enable-new-dtags") + install(TARGETS ${ROCRTST} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin) + +install ( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/../../thirdparty DESTINATION lib/rocrtst ) + include ( CPack ) diff --git a/projects/rocr-runtime/rocrtst/thirdparty/LICENSE b/projects/rocr-runtime/rocrtst/thirdparty/LICENSE new file mode 100644 index 0000000000..c960c7626f --- /dev/null +++ b/projects/rocr-runtime/rocrtst/thirdparty/LICENSE @@ -0,0 +1,38 @@ +Copyright © 2004-2006 The Trustees of Indiana University and Indiana University Research and Technology Corporation. All rights reserved. +Copyright © 2004-2005 The University of Tennessee and The University of Tennessee Research Foundation. All rights reserved. +Copyright © 2004-2005 High Performance Computing Center Stuttgart, University of Stuttgart. All rights reserved. +Copyright © 2004-2005 The Regents of the University of California. All rights reserved. +Copyright © 2009 CNRS +Copyright © 2009-2016 Inria. All rights reserved. +Copyright © 2009-2015 Université Bordeaux +Copyright © 2009-2015 Cisco Systems, Inc. All rights reserved. +Copyright © 2009-2012 Oracle and/or its affiliates. All rights reserved. +Copyright © 2010 IBM +Copyright © 2010 Jirka Hladky +Copyright © 2012 Aleksej Saushev, The NetBSD Foundation +Copyright © 2012 Blue Brain Project, EPFL. All rights reserved. +Copyright © 2013-2014 University of Wisconsin-La Crosse. All rights reserved. +Copyright © 2015 Research Organization for Information Science and Technology (RIST). All rights reserved. +Copyright © 2015-2016 Intel, Inc. All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/projects/rocr-runtime/rocrtst/thirdparty/libhwloc.so.5 b/projects/rocr-runtime/rocrtst/thirdparty/libhwloc.so.5 new file mode 100644 index 0000000000..ec80e3bb3c Binary files /dev/null and b/projects/rocr-runtime/rocrtst/thirdparty/libhwloc.so.5 differ