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  89a6daaf935e28ef3867518d28322af9cfeb4280 (commit)
       via  b88b91d25a83ae1079985f19109731d97da4e8b7 (commit)
      from  b0159b685bd6b07fff7c88f26fe0e5eea81f1eae (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=89a6daaf935e28ef3867518d28322af9cfeb4280
commit 89a6daaf935e28ef3867518d28322af9cfeb4280
Merge: b0159b6 b88b91d
Author:     Chuck Atkins <chuck.atk...@kitware.com>
AuthorDate: Fri Dec 4 13:35:15 2015 -0500
Commit:     CMake Topic Stage <kwro...@kitware.com>
CommitDate: Fri Dec 4 13:35:15 2015 -0500

    Merge topic 'detect-compiler-wrappers' into next
    
    b88b91d2 Compilers: Generalize the compiler wrapper loading into a macro


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b88b91d25a83ae1079985f19109731d97da4e8b7
commit b88b91d25a83ae1079985f19109731d97da4e8b7
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 13:35:01 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..507d7a8
--- /dev/null
+++ b/Modules/CMakeLanguageInformation.cmake
@@ -0,0 +1,36 @@
+#=============================================================================
+# Copyright 2015 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+# This file contains common code blocks used by all the language information
+# files
+
+# 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:


hooks/post-receive
-- 
CMake
_______________________________________________
Cmake-commits mailing list
Cmake-commits@cmake.org
http://public.kitware.com/mailman/listinfo/cmake-commits

Reply via email to