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
41 lines
1.5 KiB
CMake
41 lines
1.5 KiB
CMake
# Helper function to find out whether the assembler supports a particular
|
|
# command-line flag. You'd like to use the standard check_compiler_flag(), but
|
|
# that only supports a fixed list of languages, and ASM isn't one of them. So
|
|
# we do it ourselves, by trying to assemble an empty source file.
|
|
|
|
function(check_assembler_flag outvar flag)
|
|
if(NOT DEFINED "${outvar}")
|
|
if(NOT CMAKE_REQUIRED_QUIET)
|
|
message(CHECK_START "Checking for assembler flag ${flag}")
|
|
endif()
|
|
|
|
# Stop try_compile from attempting to link the result of the assembly, so
|
|
# that we don't depend on having a working linker, and also don't have to
|
|
# figure out what special symbol like _start needs to be defined in the
|
|
# test input.
|
|
#
|
|
# This change is made within the dynamic scope of this function, so
|
|
# CMAKE_TRY_COMPILE_TARGET_TYPE will be restored to its previous value on
|
|
# return.
|
|
set(CMAKE_TRY_COMPILE_TARGET_TYPE STATIC_LIBRARY)
|
|
|
|
# Try to assemble an empty file with a .S name, using the provided flag.
|
|
set(asm_source_file
|
|
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CheckAssemblerFlag.S)
|
|
write_file(${asm_source_file} "")
|
|
try_compile(${outvar}
|
|
${CMAKE_BINARY_DIR}
|
|
SOURCES ${asm_source_file}
|
|
CMAKE_FLAGS -DCMAKE_ASM_COMPILER_TARGET=${CMAKE_C_COMPILER_TARGET}
|
|
COMPILE_DEFINITIONS ${flag})
|
|
|
|
if(NOT CMAKE_REQUIRED_QUIET)
|
|
if(${outvar})
|
|
message(CHECK_PASS "Accepted")
|
|
else()
|
|
message(CHECK_FAIL "Not accepted")
|
|
endif()
|
|
endif()
|
|
endif()
|
|
endfunction()
|