Commit df1acae0 authored by Joel E. Denny's avatar Joel E. Denny
Browse files

[Clacc][OpenMP][OpenACC] Fix Clang-dedicated dir for ppc64le

Clang expects the Clang-dedicated install directory to be named
`powerpc64le`, but OpenMP and OpenACC libraries were installed to a
directory named `ppc64le` instead, expanded from
`CMAKE_SYSTEM_PROCESSOR`.  Thus, Clang wasn't finding them, and so a
`-L` was needed to avoid any versions of the libraries in system
directories.  (If there were no such system libraries, Clang found
copies of the libraries in the install's top-level lib directory,
which, unlike the Clang-dedicated directory, Clang gives lower
precedence than system directories.)
parent 5f62ab9c
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -48,8 +48,13 @@ endif()
# Clang-dedicated subdirectories.
if(OPENMP_CLANG_VERSION)
  string(TOLOWER ${CMAKE_SYSTEM_NAME} os_dir)
  if ("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL ppc64le)
    set(PROC powerpc64le)
  else()
    set(PROC ${CMAKE_SYSTEM_PROCESSOR})
  endif()
  set(OPENMP_CLANG_LIB_SUBDIR
    clang/${OPENMP_CLANG_VERSION}/lib/${os_dir}/${CMAKE_SYSTEM_PROCESSOR})
    clang/${OPENMP_CLANG_VERSION}/lib/${os_dir}/${PROC})
  set(OPENMP_CLANG_INCLUDE_SUBDIR clang/${OPENMP_CLANG_VERSION}/include)
endif()