[cmake-commits] alex committed CMakeCInformation.cmake 1.10 1.10.6.1 CMakeCXXInformation.cmake 1.13 1.13.4.1

cmake-commits at cmake.org cmake-commits at cmake.org
Tue May 1 13:07:24 EDT 2007


Update of /cvsroot/CMake/CMake/Modules
In directory public:/mounts/ram/cvs-serv1237

Modified Files:
      Tag: CMake-CrossCompileBasic
	CMakeCInformation.cmake CMakeCXXInformation.cmake 
Log Message:

ENH: use CMAKE_SYSTEM_AND_C[XX]_COMPILER_INFO_FILE for loading the file info
file, but don't overwrite it if it has already been specified. This is
needed for cross compiling so people can explicitely say which file to use
depending on their target platform

Alex


Index: CMakeCXXInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCXXInformation.cmake,v
retrieving revision 1.13
retrieving revision 1.13.4.1
diff -u -d -r1.13 -r1.13.4.1
--- CMakeCXXInformation.cmake	15 Sep 2006 18:08:36 -0000	1.13
+++ CMakeCXXInformation.cmake	1 May 2007 17:07:21 -0000	1.13.4.1
@@ -3,14 +3,16 @@
 # It also loads the available platform file for the system-compiler
 # if it exists.
 
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
-# since the gnu compiler has several names force g++
-IF(CMAKE_COMPILER_IS_GNUCXX)
-  SET(CMAKE_BASE_NAME g++)
-ENDIF(CMAKE_COMPILER_IS_GNUCXX)
-SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
-  ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+IF(NOT CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE)
+  GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_CXX_COMPILER} NAME_WE)
+  # since the gnu compiler has several names force g++
+  IF(CMAKE_COMPILER_IS_GNUCXX)
+    SET(CMAKE_BASE_NAME g++)
+  ENDIF(CMAKE_COMPILER_IS_GNUCXX)
+  SET(CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE
+    ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ENDIF(NOT CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE)
+INCLUDE(${CMAKE_SYSTEM_AND_CXX_COMPILER_INFO_FILE} OPTIONAL)
 # This should be included before the _INIT variables are
 # used to initialize the cache.  Since the rule variables 
 # have if blocks on them, users can still define them here.

Index: CMakeCInformation.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeCInformation.cmake,v
retrieving revision 1.10
retrieving revision 1.10.6.1
diff -u -d -r1.10 -r1.10.6.1
--- CMakeCInformation.cmake	11 Apr 2006 20:55:48 -0000	1.10
+++ CMakeCInformation.cmake	1 May 2007 17:07:21 -0000	1.10.6.1
@@ -3,13 +3,16 @@
 # It also loads the available platform file for the system-compiler
 # if it exists.
 
-GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
-IF(CMAKE_COMPILER_IS_GNUCC)
-  SET(CMAKE_BASE_NAME gcc)
-ENDIF(CMAKE_COMPILER_IS_GNUCC)
-SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE 
-  ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
+IF(NOT CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+  GET_FILENAME_COMPONENT(CMAKE_BASE_NAME ${CMAKE_C_COMPILER} NAME_WE)
+  IF(CMAKE_COMPILER_IS_GNUCC)
+    SET(CMAKE_BASE_NAME gcc)
+  ENDIF(CMAKE_COMPILER_IS_GNUCC)
+  SET(CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE 
+    ${CMAKE_ROOT}/Modules/Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}.cmake)
+ENDIF(NOT CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE)
+
+INCLUDE(${CMAKE_SYSTEM_AND_C_COMPILER_INFO_FILE} OPTIONAL)
 
 # This should be included before the _INIT variables are
 # used to initialize the cache.  Since the rule variables 



More information about the Cmake-commits mailing list