This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "CMake".
The branch, next has been updated via 1c791e9a205af480cc493e992b1bc9e4d6f6fd75 (commit) via 9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc (commit) from d4cc1d3df555e15699be48a603c486bdf12ba547 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=1c791e9a205af480cc493e992b1bc9e4d6f6fd75 commit 1c791e9a205af480cc493e992b1bc9e4d6f6fd75 Merge: d4cc1d3 9eeb756 Author: Chuck Atkins <chuck.atk...@kitware.com> AuthorDate: Fri Dec 4 11:58:43 2015 -0500 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Fri Dec 4 11:58:43 2015 -0500 Merge topic 'detect-compiler-wrappers' into next 9eeb756f Compilers: Generalize the compiler wrapper loading into a macro https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc commit 9eeb756f1a4c34ef598f7b5eeff4919d685ce2bc Author: Chuck Atkins <chuck.atk...@kitware.com> AuthorDate: Fri Dec 4 11:57:24 2015 -0500 Commit: Chuck Atkins <chuck.atk...@kitware.com> CommitDate: Fri Dec 4 11:57:24 2015 -0500 Compilers: Generalize the compiler wrapper loading into a macro diff --git a/Modules/CMakeCInformation.cmake b/Modules/CMakeCInformation.cmake index 5c3705c..fa87ca8 100644 --- a/Modules/CMakeCInformation.cmake +++ b/Modules/CMakeCInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -63,13 +65,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_C_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_C_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-${CMAKE_C_COMPILER_ID}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_WRAPPER}-C OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(C) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeCXXInformation.cmake b/Modules/CMakeCXXInformation.cmake index cbcd0df..b35280f 100644 --- a/Modules/CMakeCXXInformation.cmake +++ b/Modules/CMakeCXXInformation.cmake @@ -18,6 +18,8 @@ # It also loads a system - compiler - processor (or target hardware) # specific file, which is mainly useful for crosscompiling and embedded systems. +include(CMakeLanguageInformation) + # some compilers use different extensions (e.g. sdcc uses .rel) # so set the extension here first so it can be overridden by the compiler specific file if(UNIX) @@ -62,13 +64,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_CXX_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_CXX_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-${CMAKE_CXX_COMPILER_ID}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_CXX_COMPILER_WRAPPER}-CXX OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeFortranInformation.cmake b/Modules/CMakeFortranInformation.cmake index 84ece04..7bd9310 100644 --- a/Modules/CMakeFortranInformation.cmake +++ b/Modules/CMakeFortranInformation.cmake @@ -12,6 +12,8 @@ # (To distribute this file outside of CMake, substitute the full # License text for the above reference.) +include(CMakeLanguageInformation) + # This file sets the basic flags for the Fortran language in CMake. # It also loads the available platform file for the system-compiler # if it exists. @@ -39,13 +41,7 @@ endif () # load any compiler-wrapper specific information if (CMAKE_Fortran_COMPILER_WRAPPER) - set(_INCLUDED_WRAPPER_FILE 0) - if (CMAKE_Fortran_COMPILER_ID) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-${CMAKE_Fortran_COMPILER_ID}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif() - if (NOT _INCLUDED_WRAPPER_FILE) - include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_Fortran_COMPILER_WRAPPER}-Fortran OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) - endif () + __cmake_include_compiler_wrapper(CXX) endif () # We specify the compiler information in the system file for some diff --git a/Modules/CMakeLanguageInformation.cmake b/Modules/CMakeLanguageInformation.cmake new file mode 100644 index 0000000..e14f83a --- /dev/null +++ b/Modules/CMakeLanguageInformation.cmake @@ -0,0 +1,21 @@ + +# load any compiler-wrapper specific information +macro(__cmake_include_compiler_wrapper lang) + set(_INCLUDED_WRAPPER_FILE 0) + if (CMAKE_${lang}_COMPILER_ID) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + + # No platform - wrapper - lang information so maybe there's just wrapper - lang information + if(NOT _INCLUDED_WRAPPER_FILE) + if (CMAKE_${lang}_COMPILER_ID) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${CMAKE_${lang}_COMPILER_ID}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif() + if (NOT _INCLUDED_WRAPPER_FILE) + include(Compiler/${CMAKE_${lang}_COMPILER_WRAPPER}-${lang} OPTIONAL RESULT_VARIABLE _INCLUDED_WRAPPER_FILE) + endif () + endif () +endmacro () ----------------------------------------------------------------------- Summary of changes: Modules/CMakeCInformation.cmake | 10 +++------- Modules/CMakeCXXInformation.cmake | 10 +++------- Modules/CMakeFortranInformation.cmake | 10 +++------- Modules/CMakeLanguageInformation.cmake | 21 +++++++++++++++++++++ 4 files changed, 30 insertions(+), 21 deletions(-) create mode 100644 Modules/CMakeLanguageInformation.cmake hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/mailman/listinfo/cmake-commits