CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
43 lines
2.0 KiB
CMake
43 lines
2.0 KiB
CMake
function(add_compile_test testFileName)
|
|
cmake_path(GET testFileName STEM LAST_ONLY testName)
|
|
set(testName ${testPrefix}${testName})
|
|
message(STATUS "testName: ${testName}")
|
|
add_executable(${testName} ${testFileName})
|
|
set_source_files_properties(${testFileName} PROPERTIES LANGUAGE HIP)
|
|
|
|
target_include_directories(${testName} PUBLIC ${CMAKE_SOURCE_DIR}/inc)
|
|
if(NOT DISABLE_WERROR)
|
|
target_compile_options(${testName} PUBLIC "-Werror")
|
|
endif()
|
|
target_compile_options(${testName} PUBLIC "-Wall" "-Wextra" "-Wshadow" "-Wnull-dereference" "-Wold-style-cast" "-Wzero-as-null-pointer-constant" "-Wfloat-equal" "-Wdouble-promotion")
|
|
target_compile_options(${testName} PUBLIC "-save-temps=obj" "-O2" "-fgpu-rdc")
|
|
target_link_options(${testName} PUBLIC "-fgpu-rdc" "--hip-link")
|
|
target_link_libraries(${testName} PRIVATE hipthreads)
|
|
# needed to get intellisense to stop complaining about the co-ordinate built-ins not being defined
|
|
target_compile_definitions(${testName} PUBLIC __HIP__)
|
|
# add_custom_command(TARGET ${testName} POST_BUILD
|
|
# COMMAND ${LLVM_DIS} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${testName}.dir/${testName}-host-x86_64-unknown-linux-gnu.bc
|
|
# )
|
|
# add_custom_command(TARGET ${testName} POST_BUILD
|
|
# COMMAND ${LLVM_DIS} ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/${testName}.dir/${testName}-hip-amdgcn-amd-amdhsa-gfx1034.bc
|
|
# )
|
|
#add_custom_target(targetName)
|
|
#add_custom_command(TARGET targetName POST_BUILD COMMAND ${testName})
|
|
endfunction(add_compile_test)
|
|
|
|
set(testPrefix "")
|
|
|
|
# TEMP: until libhipcxx resolves this
|
|
add_compile_definitions(_LIBCUDACXX_ALLOW_UNSUPPORTED_ARCHITECTURE)
|
|
|
|
file(GLOB TEST_SOURCES "*.cxx")
|
|
foreach(testFileName ${TEST_SOURCES})
|
|
add_compile_test(${testFileName})
|
|
endforeach(testFileName)
|
|
|
|
# For windows, Change in a way to pass lib details
|
|
if (WIN32)
|
|
target_link_libraries(hip_thread_mutex_test PRIVATE -lhipthreads -L${CMAKE_BINARY_DIR})
|
|
target_link_libraries(hip_thread_condvar_test PRIVATE -lhipthreads -L${CMAKE_BINARY_DIR})
|
|
endif()
|