CMakeSwiftInformation.cmake 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. # Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. # file Copyright.txt or https://cmake.org/licensing for details.
  3. set(CMAKE_Swift_OUTPUT_EXTENSION .o)
  4. set(CMAKE_INCLUDE_FLAG_Swift "-I")
  5. # Load compiler-specific information.
  6. if(CMAKE_Swift_COMPILER_ID)
  7. include(Compiler/${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
  8. endif()
  9. # load the system- and compiler specific files
  10. if(CMAKE_Swift_COMPILER_ID)
  11. # load a hardware specific file, mostly useful for embedded compilers
  12. if(CMAKE_SYSTEM_PROCESSOR)
  13. include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
  14. endif()
  15. include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Swift_COMPILER_ID}-Swift OPTIONAL)
  16. endif()
  17. # for most systems a module is the same as a shared library
  18. # so unless the variable CMAKE_MODULE_EXISTS is set just
  19. # copy the values from the LIBRARY variables
  20. if(NOT CMAKE_MODULE_EXISTS)
  21. set(CMAKE_SHARED_MODULE_Swift_FLAGS ${CMAKE_SHARED_LIBRARY_Swift_FLAGS})
  22. set(CMAKE_SHARED_MODULE_CREATE_Swift_FLAGS ${CMAKE_SHARED_LIBRARY_CREATE_Swift_FLAGS})
  23. endif()
  24. include(CMakeCommonLanguageInclude)
  25. set(CMAKE_Swift_INFORMATION_LOADED 1)