1# Distributed under the OSI-approved BSD 3-Clause License. See accompanying 2# file Copyright.txt or https://cmake.org/licensing for details. 3 4 5# This file contains common code blocks used by all the language information 6# files 7 8# load any compiler-wrapper specific information 9macro(__cmake_include_compiler_wrapper lang) 10 set(_INCLUDED_WRAPPER_FILE 0) 11 if (CMAKE_${lang}_COMPILER_ID) 12 include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) 13 endif() 14 if (NOT _INCLUDED_WRAPPER_FILE) 15 include(Platform/${CMAKE_EFFECTIVE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) 16 endif () 17 18 # No platform - wrapper - lang information so maybe there's just wrapper - lang information 19 if(NOT _INCLUDED_WRAPPER_FILE) 20 if (CMAKE_${lang}_COMPILER_ID) 21 include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) 22 endif() 23 if (NOT _INCLUDED_WRAPPER_FILE) 24 include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) 25 endif () 26 endif () 27endmacro () 28