[Cmake-commits] CMake branch, next, updated. v3.4.1-1622-g995642c
Chuck Atkins
chuck.atkins at kitware.com
Fri Dec 4 17:30:00 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 995642cbf6d47366c3d24285a9d2120b569d3527 (commit)
via e7d06d84eb0cf3db967474d807a88415fcd20c08 (commit)
from b23beeab3872c765c12b4e90565cc89c891ce6d5 (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=995642cbf6d47366c3d24285a9d2120b569d3527
commit 995642cbf6d47366c3d24285a9d2120b569d3527
Merge: b23beea e7d06d8
Author: Chuck Atkins <chuck.atkins at kitware.com>
AuthorDate: Fri Dec 4 17:29:59 2015 -0500
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Dec 4 17:29:59 2015 -0500
Merge topic 'detect-compiler-wrappers' into next
e7d06d84 Compiler: Generalize the compiler wrapper loading into a macro
https://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=e7d06d84eb0cf3db967474d807a88415fcd20c08
commit e7d06d84eb0cf3db967474d807a88415fcd20c08
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 17:29:44 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..e03d149
--- /dev/null
+++ b/Modules/CMakeLanguageInformation.cmake
@@ -0,0 +1,37 @@
+
+#=============================================================================
+# 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