diff --git a/CMakeLists.txt b/CMakeLists.txt index 37631ff09..3a1fc3d22 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -221,15 +221,13 @@ if(NOT TRITON_CORE_HEADERS_ONLY) # Some libs are installed to ${TRITON_THIRD_PARTY_INSTALL_PREFIX}/{LIB}/lib64 instead # of ${TRITON_THIRD_PARTY_INSTALL_PREFIX}/{LIB}/lib on Centos set (LIB_DIR "lib") - # /etc/os-release does not exist on Windows - if(EXISTS "/etc/os-release") - file(STRINGS /etc/os-release DISTRO REGEX "^NAME=") - string(REGEX REPLACE "NAME=\"(.*)\"" "\\1" DISTRO "${DISTRO}") - message(STATUS "Distro Name: ${DISTRO}") - if(DISTRO MATCHES "CentOS.*") + if(LINUX) + file(STRINGS "/etc/os-release" DISTRO_ID_LIKE REGEX "ID_LIKE") + if(${DISTRO_ID_LIKE} MATCHES "rhel|centos") set (LIB_DIR "lib64") - endif() - endif() + endif(${DISTRO_ID_LIKE} MATCHES "rhel|centos") + endif(LINUX) + set(TRITON_CORE_HEADERS_ONLY OFF) # Need to use ExternalProject for our builds so that we can get the # correct dependencies between Triton shared library components and diff --git a/src/test/CMakeLists.txt b/src/test/CMakeLists.txt index a4c4613ca..2df718b30 100644 --- a/src/test/CMakeLists.txt +++ b/src/test/CMakeLists.txt @@ -672,6 +672,7 @@ if(${TRITON_ENABLE_GPU}) target_link_libraries( input_byte_size_test PRIVATE + dl triton-common-error # from repo-common triton-core triton-common-logging # from repo-common @@ -680,8 +681,8 @@ if(${TRITON_ENABLE_GPU}) GTest::gtest_main GTest::gmock protobuf::libprotobuf - ${CNMEM_LIBRARY} CUDA::cudart + ${CNMEM_LIBRARY} ) else() add_executable(