[Cmake-commits] CMake branch, next, updated. v2.8.2-446-gcbbd9d8

Alexander Neundorf neundorf at kde.org
Sun Aug 15 10:42:22 EDT 2010


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  cbbd9d8dc2ee433ae6d116c2907f8e84c2513b26 (commit)
       via  b333779e34e6f9f68a2280830f8cf0ff3fdd39bf (commit)
       via  691fc2baa84dc73e76f8e6e6e555d807fd344f03 (commit)
      from  a67db02e535b374863fe6a8e8ab1691d75ba6c30 (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 -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=cbbd9d8dc2ee433ae6d116c2907f8e84c2513b26
commit cbbd9d8dc2ee433ae6d116c2907f8e84c2513b26
Merge: a67db02 b333779
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 15 16:40:48 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 15 16:40:48 2010 +0200

    Merge branch 'ImproveAsmCompilerIDDetection' into next


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b333779e34e6f9f68a2280830f8cf0ff3fdd39bf
commit b333779e34e6f9f68a2280830f8cf0ff3fdd39bf
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 15 16:36:38 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 15 16:36:38 2010 +0200

    Detect a COMPILER_ID also for ASM.
    
    For assembler, the "compiler ID" cannot be detected by "compiling" a
    source file, since there is not source file all assemblers understand.
    Instead the function CMAKE_DETERMINE_COMPILER_ID_VENDOR() is used to
    run the assembler and check its output.
    For this the CMAKE_DETERMINE_COMPILER_ID_VENDOR() function had to be
    extended so that it creates the run directory if it doesn't exist yet.
    
    In CMakeASMInformation.cmake now also CMAKE_ASM_COMPILER_ID is used
    (but there are no such files yet, will come with the support for the
    IAR toolchain).
    
    Alex

diff --git a/Modules/CMakeASMInformation.cmake b/Modules/CMakeASMInformation.cmake
index 964a2a9..b94303e 100644
--- a/Modules/CMakeASMInformation.cmake
+++ b/Modules/CMakeASMInformation.cmake
@@ -28,18 +28,25 @@ IF("${CMAKE_BASE_NAME}" STREQUAL "as")
   SET(CMAKE_BASE_NAME gas)
 ENDIF("${CMAKE_BASE_NAME}" STREQUAL "as")
 
-INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
+# Load compiler-specific information.
+SET(_INCLUDED_FILE "")
+IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+  INCLUDE(Compiler/${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL  RESULT_VARIABLE _INCLUDED_FILE)
+ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+IF(NOT _INCLUDED_FILE)
+  INCLUDE(Platform/${CMAKE_BASE_NAME} OPTIONAL)
+ENDIF(NOT _INCLUDED_FILE)
 
 IF(CMAKE_SYSTEM_PROCESSOR)
-  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL  RESULT_VARIABLE _INCLUDED_FILE)
+  IF(NOT _INCLUDED_FILE)
+    INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME}-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
+  ENDIF(NOT _INCLUDED_FILE)
 ENDIF(CMAKE_SYSTEM_PROCESSOR)
-IF(NOT _INCLUDED_FILE)
-  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM-${CMAKE_SYSTEM_PROCESSOR} OPTIONAL)
-ENDIF(NOT _INCLUDED_FILE)
 
-INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL RESULT_VARIABLE _INCLUDED_FILE)
+INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}-ASM${ASM_DIALECT} OPTIONAL  RESULT_VARIABLE _INCLUDED_FILE)
 IF(NOT _INCLUDED_FILE)
-  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_C_COMPILER_ID}-ASM OPTIONAL)
+  INCLUDE(Platform/${CMAKE_SYSTEM_NAME}-${CMAKE_BASE_NAME} OPTIONAL)
 ENDIF(NOT _INCLUDED_FILE)
 
 # Set default assembler file extensions:
diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index ae49fd3..06dd6b8 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -57,6 +57,25 @@ IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
   GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
 ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
 
+
+IF(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+
+  # Table of per-vendor compiler id flags with expected output.
+  LIST(APPEND CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDORS GNU )
+  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_FLAGS_GNU "--version")
+  SET(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID_VENDOR_REGEX_GNU "GNU assembler")
+
+  CMAKE_DETERMINE_COMPILER_ID_VENDOR(ASM${ASM_DIALECT})
+
+  IF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+    MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is ${CMAKE_ASM${ASM_DIALECT}_COMPILER_ID}")
+  ELSE(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+    MESSAGE(STATUS "The ASM${ASM_DIALECT} compiler identification is unknown")
+  ENDIF(CMAKE_ASM${ASM_DIALECT}_COMPILER_ID)
+
+ENDIF()
+
+
 # If we have a gas/as cross compiler, they have usually some prefix, like
 # e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
 # The other tools of the toolchain usually have the same prefix
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index 836d9db..5fc2238 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -261,6 +261,17 @@ ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)
 # We try running the compiler with the flag for each vendor and
 # matching its regular expression in the output.
 FUNCTION(CMAKE_DETERMINE_COMPILER_ID_VENDOR lang)
+
+  IF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
+    # We get here when this function is called not from within CMAKE_DETERMINE_COMPILER_ID()
+    # This is done e.g. for detecting the compiler ID for assemblers.
+    # Compute the directory in which to run the test and Create a clean working directory.
+    SET(CMAKE_${lang}_COMPILER_ID_DIR ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CompilerId${lang})
+    FILE(REMOVE_RECURSE ${CMAKE_${lang}_COMPILER_ID_DIR})
+    FILE(MAKE_DIRECTORY ${CMAKE_${lang}_COMPILER_ID_DIR})
+  ENDIF(NOT CMAKE_${lang}_COMPILER_ID_DIR)
+
+
   FOREACH(vendor ${CMAKE_${lang}_COMPILER_ID_VENDORS})
     SET(flags ${CMAKE_${lang}_COMPILER_ID_VENDOR_FLAGS_${vendor}})
     SET(regex ${CMAKE_${lang}_COMPILER_ID_VENDOR_REGEX_${vendor}})

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=691fc2baa84dc73e76f8e6e6e555d807fd344f03
commit 691fc2baa84dc73e76f8e6e6e555d807fd344f03
Author:     Alex Neundorf <neundorf at kde.org>
AuthorDate: Sun Aug 15 16:08:54 2010 +0200
Commit:     Alex Neundorf <neundorf at kde.org>
CommitDate: Sun Aug 15 16:08:54 2010 +0200

    Remove trailing spaces
    
    Alex

diff --git a/Modules/CMakeDetermineASMCompiler.cmake b/Modules/CMakeDetermineASMCompiler.cmake
index 9e5bc72..ae49fd3 100644
--- a/Modules/CMakeDetermineASMCompiler.cmake
+++ b/Modules/CMakeDetermineASMCompiler.cmake
@@ -38,9 +38,9 @@ ELSE(NOT CMAKE_ASM${ASM_DIALECT}_COMPILER)
   # we only get here if CMAKE_ASM${ASM_DIALECT}_COMPILER was specified using -D or a pre-made CMakeCache.txt
   # (e.g. via ctest) or set in CMAKE_TOOLCHAIN_FILE
   #
-  # if a compiler was specified by the user but without path, 
+  # if a compiler was specified by the user but without path,
   # now try to find it with the full path
-  # if it is found, force it into the cache, 
+  # if it is found, force it into the cache,
   # if not, don't overwrite the setting (which was given by the user) with "NOTFOUND"
   GET_FILENAME_COMPONENT(_CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
   IF(NOT _CMAKE_USER_ASM${ASM_DIALECT}_COMPILER_PATH)
@@ -57,11 +57,11 @@ IF (NOT _CMAKE_TOOLCHAIN_LOCATION)
   GET_FILENAME_COMPONENT(_CMAKE_TOOLCHAIN_LOCATION "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" PATH)
 ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
 
-# If we have a gas/as cross compiler, they have usually some prefix, like 
+# If we have a gas/as cross compiler, they have usually some prefix, like
 # e.g. powerpc-linux-gas, arm-elf-gas or i586-mingw32msvc-gas .
 # The other tools of the toolchain usually have the same prefix
 # NAME_WE cannot be used since then this test will fail for names lile
-# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be 
+# "arm-unknown-nto-qnx6.3.0-gas.exe", where BASENAME would be
 # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
 IF (NOT _CMAKE_TOOLCHAIN_PREFIX)
   GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_ASM${ASM_DIALECT}_COMPILER}" NAME)
@@ -86,7 +86,7 @@ SET(_CMAKE_ASM_COMPILER_ARG1 "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ARG1}")
 SET(_CMAKE_ASM_COMPILER_ENV_VAR "${CMAKE_ASM${ASM_DIALECT}_COMPILER_ENV_VAR}")
 
 # configure variables set in this file for fast reload later on
-CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in 
+CONFIGURE_FILE(${CMAKE_ROOT}/Modules/CMakeASMCompiler.cmake.in
   ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeASM${ASM_DIALECT}Compiler.cmake IMMEDIATE @ONLY)
 
 SET(_CMAKE_ASM_COMPILER)
diff --git a/Modules/CMakeDetermineCompilerId.cmake b/Modules/CMakeDetermineCompilerId.cmake
index ab81215..836d9db 100644
--- a/Modules/CMakeDetermineCompilerId.cmake
+++ b/Modules/CMakeDetermineCompilerId.cmake
@@ -63,7 +63,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID lang flagvar src)
 
   SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
   SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
-  SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" 
+  SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
     PARENT_SCOPE)
 ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID)
 
@@ -247,7 +247,7 @@ FUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang file)
   # Return the information extracted.
   SET(CMAKE_${lang}_COMPILER_ID "${CMAKE_${lang}_COMPILER_ID}" PARENT_SCOPE)
   SET(CMAKE_${lang}_PLATFORM_ID "${CMAKE_${lang}_PLATFORM_ID}" PARENT_SCOPE)
-  SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}" 
+  SET(MSVC_${lang}_ARCHITECTURE_ID "${MSVC_${lang}_ARCHITECTURE_ID}"
     PARENT_SCOPE)
   SET(CMAKE_EXECUTABLE_FORMAT "${CMAKE_EXECUTABLE_FORMAT}" PARENT_SCOPE)
 ENDFUNCTION(CMAKE_DETERMINE_COMPILER_ID_CHECK lang)

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeASMInformation.cmake       |   21 ++++++++++++++-------
 Modules/CMakeDetermineASMCompiler.cmake |   29 ++++++++++++++++++++++++-----
 Modules/CMakeDetermineCompilerId.cmake  |   15 +++++++++++++--
 3 files changed, 51 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list