2022-11-02 16:31:54 +01:00
|
|
|
# Common Tests - Test independent of all platforms
|
|
|
|
|
set(TEST_SRC
|
2023-12-28 15:05:35 +01:00
|
|
|
error_handling_common.cc
|
2022-11-02 16:31:54 +01:00
|
|
|
hipGetErrorName.cc
|
|
|
|
|
hipGetErrorString.cc
|
2023-06-21 15:56:54 +05:30
|
|
|
hipDrvGetErrorName.cc
|
|
|
|
|
hipDrvGetErrorString.cc
|
2023-12-28 15:05:35 +01:00
|
|
|
hipGetLastError.cc
|
|
|
|
|
hipPeekAtLastError.cc
|
2026-01-19 16:16:14 -05:00
|
|
|
hipDynamicLogging.cc
|
2022-11-02 16:31:54 +01:00
|
|
|
)
|
2025-07-07 17:49:00 +05:30
|
|
|
|
|
|
|
|
if(UNIX)
|
|
|
|
|
set(TEST_SRC
|
|
|
|
|
${TEST_SRC}
|
|
|
|
|
hipGetLastErrorOnAbort.cc)
|
|
|
|
|
endif()
|
|
|
|
|
|
2024-11-08 09:49:40 +05:30
|
|
|
add_executable(hipGetLastErrorEnv_Exe EXCLUDE_FROM_ALL hipGetLastErrorEnv_Exe.cc)
|
|
|
|
|
add_executable(hipPeekAtLastErrorEnv_Exe EXCLUDE_FROM_ALL hipPeekAtLastErrorEnv_Exe.cc)
|
2025-12-03 16:53:17 +00:00
|
|
|
|
|
|
|
|
set_source_files_properties(hipGetLastErrorEnv_Exe.cc PROPERTIES LANGUAGE HIP)
|
|
|
|
|
set_source_files_properties(hipPeekAtLastErrorEnv_Exe.cc PROPERTIES LANGUAGE HIP)
|
|
|
|
|
set_target_properties(hipGetLastErrorEnv_Exe PROPERTIES LINKER_LANGUAGE HIP)
|
|
|
|
|
set_target_properties(hipPeekAtLastErrorEnv_Exe PROPERTIES LINKER_LANGUAGE HIP)
|
|
|
|
|
target_link_libraries(hipGetLastErrorEnv_Exe hip::host hip::device)
|
|
|
|
|
target_link_libraries(hipPeekAtLastErrorEnv_Exe hip::host hip::device)
|
|
|
|
|
|
2024-12-09 13:14:37 +05:30
|
|
|
if(HIP_PLATFORM MATCHES "amd")
|
|
|
|
|
set(AMD_SRC
|
|
|
|
|
hipExtGetLastError.cc
|
|
|
|
|
)
|
|
|
|
|
set(TEST_SRC ${TEST_SRC} ${AMD_SRC})
|
|
|
|
|
endif()
|
2022-11-02 16:31:54 +01:00
|
|
|
hip_add_exe_to_target(NAME ErrorHandlingTest
|
|
|
|
|
TEST_SRC ${TEST_SRC}
|
2025-12-03 16:53:17 +00:00
|
|
|
TEST_TARGET_NAME build_tests)
|
2024-11-08 09:49:40 +05:30
|
|
|
|
2025-09-03 20:34:38 +05:30
|
|
|
add_dependencies(ErrorHandlingTest hipGetLastErrorEnv_Exe hipPeekAtLastErrorEnv_Exe)
|
|
|
|
|
set_property(GLOBAL APPEND PROPERTY G_INSTALL_EXE_TARGETS hipGetLastErrorEnv_Exe hipPeekAtLastErrorEnv_Exe)
|