[Openmp-commits] [PATCH] D89426: [libomptarget] Require LLVM source tree to build libomptarget
Jon Chesterfield via Phabricator via Openmp-commits
openmp-commits at lists.llvm.org
Fri Oct 16 07:30:20 PDT 2020
JonChesterfield added a comment.
I'm unclear on what that cmake is doing. Copied here:
set(ENABLE_LIBOMPTARGET ON)
# Currently libomptarget cannot be compiled on Windows or MacOS X.
# Since the device plugins are only supported on Linux anyway,
# there is no point in trying to compile libomptarget on other OSes.
if (APPLE OR WIN32 OR NOT OPENMP_HAVE_STD_CPP14_FLAG)
set(ENABLE_LIBOMPTARGET OFF)
endif()
option(OPENMP_ENABLE_LIBOMPTARGET "Enable building libomptarget for offloading."
${ENABLE_LIBOMPTARGET})
if (OPENMP_ENABLE_LIBOMPTARGET)
# Check that the library can actually be built.
if (APPLE OR WIN32)
message(FATAL_ERROR "libomptarget cannot be built on Windows and MacOS X!")
elseif (NOT OPENMP_HAVE_STD_CPP14_FLAG)
message(FATAL_ERROR "Host compiler must support C++14 to build libomptarget!")
endif()
add_subdirectory(libomptarget)
endif()
Is this using ENABLE_LIBOMPTARGET as the default value for OPENMP_ENABLE_LIBOMPTARGET? If so, does setting OPENMP_ENABLE_LIBOMPTARGET win out?
A reasonable guess seems to be:
if (NOT LLVM_MAIN_INCLUDE_DIR)
message(...) #not fatal
set(ENABLE_LIBOMPTARGET OFF)
endif()
Probably combined with the above for anyone who builds libomptarget without the containing libomp.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89426/new/
https://reviews.llvm.org/D89426
More information about the Openmp-commits
mailing list