You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

AsmOp.cmake 632B

123456789101112131415161718192021
  1. # Check for assembler option specified
  2. function(asm_op output_var op description)
  3. SET(asm_code "
  4. ${op}
  5. ")
  6. file(WRITE "${CMAKE_BINARY_DIR}/asm.S" "${asm_code}")
  7. try_compile(HAVE_OP
  8. "${CMAKE_BINARY_DIR}"
  9. "${CMAKE_BINARY_DIR}/asm.S"
  10. CMAKE_FLAGS "-DCMAKE_ASM_LINK_EXECUTABLE='echo not linking now...'")
  11. #file(REMOVE "${CMAKE_BINARY_DIR}/asm.s")
  12. if(HAVE_OP)
  13. MESSAGE(STATUS "Compilation of ${description} asm set is supported")
  14. else()
  15. MESSAGE(STATUS "Compilation of ${description} asm set is -NOT- supported")
  16. endif()
  17. set(${output_var} "${HAVE_OP}" PARENT_SCOPE)
  18. endfunction()