From a400051d3a8f54964a7c473c9451a1cd7dfb48c8 Mon Sep 17 00:00:00 2001 From: Alex Xie Date: Thu, 21 May 2020 15:31:37 -0400 Subject: [PATCH] Move rocm include directory to the end of the list for include files Fix compile error. Before this change, there is compile error in my build computer. The cause is that /opt/rocm/include has an older version of CL header files. When compiling, we should use header files from this opencl source code folders first. This fix changes the order of include directories. Search the header files inside this opencl source code folders first. Change-Id: I3420a634ed9e1b38b8e5201a0a39a36d61f97986 --- opencl/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/opencl/CMakeLists.txt b/opencl/CMakeLists.txt index 4c7da46bb3..e7fcf17fa0 100644 --- a/opencl/CMakeLists.txt +++ b/opencl/CMakeLists.txt @@ -39,7 +39,6 @@ if(USE_COMGR_LIBRARY) ) MESSAGE(STATUS "Code Object Manager found at ${amd_comgr_DIR}.") - include_directories("$") endif() @@ -70,6 +69,10 @@ add_subdirectory(amdocl) add_subdirectory(tools/clinfo) add_subdirectory(tools/cltrace) +if(USE_COMGR_LIBRARY) + include_directories("$") +endif() + # get date information based on UTC # use the last two digits of year + week number + day in the week as OPENCL_VERSION_GITDATE # use the commit date, instead of build date