CMakeLanguageInformation.cmake 1.2 KB

123456789101112131415161718192021222324252627
  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 contains common code blocks used by all the language information
  4. # files
  5. # load any compiler-wrapper specific information
  6. macro(__cmake_include_compiler_wrapper lang)
  7. set(_INCLUDED_WRAPPER_FILE 0)
  8. if (CMAKE_${lang}_COMPILER_ID)
  9. include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  10. endif()
  11. if (NOT _INCLUDED_WRAPPER_FILE)
  12. include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  13. endif ()
  14. # No platform - wrapper - lang information so maybe there's just wrapper - lang information
  15. if(NOT _INCLUDED_WRAPPER_FILE)
  16. if (CMAKE_${lang}_COMPILER_ID)
  17. include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  18. endif()
  19. if (NOT _INCLUDED_WRAPPER_FILE)
  20. include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE)
  21. endif ()
  22. endif ()
  23. endmacro ()