CMakeTestASMCompiler.cmake 865 B

12345678910111213141516171819202122232425
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. # This file is used by EnableLanguage in cmGlobalGenerator to
  4. # determine that the selected ASM compiler works.
  5. # For assembler this can only check whether the compiler has been found,
  6. # because otherwise there would have to be a separate assembler source file
  7. # for each assembler on every architecture.
  8. set(_ASM_COMPILER_WORKS 0)
  9. if(CMAKE_ASM${ASM_DIALECT}_COMPILER)
  10. set(_ASM_COMPILER_WORKS 1)
  11. endif()
  12. # when using generic "ASM" support, we must have detected the compiler ID, fail otherwise:
  13. if("ASM${ASM_DIALECT}" STREQUAL "ASM")
  14. if(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
  15. set(_ASM_COMPILER_WORKS 0)
  16. endif()
  17. endif()
  18. set(CMAKE_ASM${ASM_DIALECT}_COMPILER_WORKS ${_ASM_COMPILER_WORKS} CACHE INTERNAL "")