Commit 750c42d6 authored by Ted Themistokleous's avatar Ted Themistokleous
Browse files

Add Checks for Unix distributions

parent 28b9cab5
......@@ -46,6 +46,24 @@ else()
set(CMAKE_INSTALL_PREFIX "/opt/rocm" CACHE PATH "")
endif()
# Determine UNIX distribution
if(NOT WIN32)
file(READ "/etc/os-release" ETC_ISSUE)
string(REGEX MATCH "Debian|Ubuntu|CentOS|RHEL|SLES" DIST ${ETC_ISSUE})
if (DIST STREQUAL "Debian")
message(STATUS "Debian OS detected!")
elseif(DIST STREQUAL "Ubuntu")
message(STATUS "Ubuntu OS detected!")
elseif(DIST STREQUAL "CentOS")
message(STATUS "CENTOS detected!")
elseif(DIST STREQUAL "Red Hat")
message(STATUS "Red Hat detected!")
elseif(DIST STREQUAL "SUSE")
message(STATUS "SLES detected!")
endif()
endif()
set(CMAKE_BUILD_RPATH "${CMAKE_BINARY_DIR}/lib")
project(migraphx)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment