[Cmake-commits] CMake branch, next, updated. v3.4.1-1618-ge907bb6

Chuck Atkins chuck.atkins at kitware.com
Fri Dec 4 13:47:49 EST 2015


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  e907bb6a216e5d3d68b5d9609338382bd3916de1 (commit)
       via  7d9197505db6dbc6369501ad68c1fa98c4bc2ae8 (commit)
      from  fe032a678a4e893c33ebecccec06b0167ce52b54 (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=e907bb6a216e5d3d68b5d9609338382bd3916de1
commit e907bb6a216e5d3d68b5d9609338382bd3916de1
Merge: fe032a6 7d91975
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Dec 4 13:47:47 2015 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 4 13:47:47 2015 -0500

    Merge topic 'detect-compiler-wrappers' into next
    
    7d919750 Compiler: Generalize the compiler wrapper loading into a macro


https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7d9197505db6dbc6369501ad68c1fa98c4bc2ae8
commit 7d9197505db6dbc6369501ad68c1fa98c4bc2ae8
Author:     Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Dec 4 11:57:24 2015 -0500
Commit:     Chuck Atkins <chuck.atkins at kitware.com>
CommitDate: Fri Dec 4 13:47:24 2015 -0500

    Compiler: 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..1fd0972 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(Fortran)
 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


More information about the Cmake-commits mailing list