diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 21:30:40 +0000 |
commit | 133a45c109da5310add55824db21af5239951f93 (patch) | |
tree | ba6ac4c0a950a0dda56451944315d66409923918 /cmake/AsmOp.cmake | |
parent | Initial commit. (diff) | |
download | rspamd-133a45c109da5310add55824db21af5239951f93.tar.xz rspamd-133a45c109da5310add55824db21af5239951f93.zip |
Adding upstream version 3.8.1.upstream/3.8.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | cmake/AsmOp.cmake | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/cmake/AsmOp.cmake b/cmake/AsmOp.cmake new file mode 100644 index 0000000..bcf9d99 --- /dev/null +++ b/cmake/AsmOp.cmake @@ -0,0 +1,19 @@ +# Check for assembler option specified + +MACRO(asm_op output_var description) + IF(NOT ${output_var}) + file(WRITE "${CMAKE_BINARY_DIR}/asm.S" "${ASM_CODE}") + try_compile(HAVE_OP + "${CMAKE_BINARY_DIR}" + "${CMAKE_BINARY_DIR}/asm.S" + CMAKE_FLAGS "-DCMAKE_ASM_LINK_EXECUTABLE='echo not linking now...'") + + if(HAVE_OP) + MESSAGE(STATUS "Compilation of ${description} asm set is supported") + else() + MESSAGE(STATUS "Compilation of ${description} asm set is -NOT- supported") + endif() + + set(${output_var} "${HAVE_OP}" CACHE INTERNAL "${description}") + ENDIF() +ENDMACRO() |