Skip to content

Error out when LIBOMPTARGET_OMPT_SUPPORT is requested but not supported #146865

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions offload/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -326,15 +326,17 @@ endmacro()

# OMPT support for libomptarget
# Follow host OMPT support and check if host support has been requested.
# LIBOMP_HAVE_OMPT_SUPPORT indicates whether host OMPT support has been implemented.
# LIBOMP_OMPT_SUPPORT indicates whether host OMPT support has been requested (default is ON).
# LIBOMPTARGET_OMPT_SUPPORT indicates whether target OMPT support has been requested (default is ON).
set(OMPT_TARGET_DEFAULT FALSE)
if ((LIBOMP_HAVE_OMPT_SUPPORT) AND (LIBOMP_OMPT_SUPPORT) AND (NOT WIN32))
if (LIBOMP_OMPT_SUPPORT AND (NOT WIN32))
set (OMPT_TARGET_DEFAULT TRUE)
endif()
# LIBOMPTARGET_OMPT_SUPPORT indicates whether target OMPT support has been requested.
set(LIBOMPTARGET_OMPT_SUPPORT ${OMPT_TARGET_DEFAULT} CACHE BOOL "OMPT-target-support?")
if ((OMPT_TARGET_DEFAULT) AND (LIBOMPTARGET_OMPT_SUPPORT))
if (LIBOMPTARGET_OMPT_SUPPORT)
if(NOT LIBOMP_OMPT_SUPPORT)
message(FATAL_ERROR "OMPT Target support requested but OMPT (host) support is not enabled")
endif()
add_definitions(-DOMPT_SUPPORT=1)
message(STATUS "OMPT target enabled")
else()
Expand Down
Loading