[Cmake-commits] [cmake-commits] hoffman committed CMakeDetermineCCompiler.cmake 1.52.2.1 1.52.2.2 CMakeDetermineCXXCompiler.cmake 1.45.2.1 1.45.2.2 CheckCCompilerFlag.cmake 1.1 1.1.14.1 FindThreads.cmake 1.18 1.18.2.1 readme.txt 1.14 1.14.2.1

cmake-commits at cmake.org cmake-commits at cmake.org
Fri Sep 12 10:56:22 EDT 2008


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

Modified Files:
      Tag: CMake-2-6
	CMakeDetermineCCompiler.cmake CMakeDetermineCXXCompiler.cmake 
	CheckCCompilerFlag.cmake FindThreads.cmake readme.txt 
Log Message:
ENH: 2.6.2 RC 4 merge into main tree


Index: CMakeDetermineCCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCCompiler.cmake,v
retrieving revision 1.52.2.1
retrieving revision 1.52.2.2
diff -C 2 -d -r1.52.2.1 -r1.52.2.2
*** CMakeDetermineCCompiler.cmake	23 May 2008 20:09:33 -0000	1.52.2.1
--- CMakeDetermineCCompiler.cmake	12 Sep 2008 14:56:20 -0000	1.52.2.2
***************
*** 89,106 ****
  ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
  
- # If we have a gcc cross compiler, they have usually some prefix, like 
- # e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc .
- # 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-gcc.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_C_COMPILER}" NAME)
-   IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
-     STRING(REGEX REPLACE "^(.+-)g?cc(\\.exe)?$"  "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
-   ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
- ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
- 
- 
  # Build a small source file to identify the compiler.
  IF(${CMAKE_GENERATOR} MATCHES "Visual Studio")
--- 89,92 ----
***************
*** 142,145 ****
--- 128,158 ----
  ENDIF(NOT CMAKE_C_COMPILER_ID_RUN)
  
+ # If we have a gcc cross compiler, they have usually some prefix, like 
+ # e.g. powerpc-linux-gcc, arm-elf-gcc or i586-mingw32msvc-gcc .
+ # 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-gcc.exe", where BASENAME would be 
+ # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
+ IF (CMAKE_CROSSCOMPILING  
+     AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
+     AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+   GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_C_COMPILER}" NAME)
+   IF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
+     SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+   ENDIF (COMPILER_BASENAME MATCHES "^(.+-)g?cc(\\.exe)?$")
+ 
+   # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
+   # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
+   IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+     SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+   ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ 
+ ENDIF (CMAKE_CROSSCOMPILING  
+     AND "${CMAKE_C_COMPILER_ID}" MATCHES "GNU"
+     AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+ 
+ 
+ 
+ 
  INCLUDE(CMakeFindBinUtils)
  

Index: FindThreads.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/FindThreads.cmake,v
retrieving revision 1.18
retrieving revision 1.18.2.1
diff -C 2 -d -r1.18 -r1.18.2.1
*** FindThreads.cmake	24 Sep 2007 13:53:41 -0000	1.18
--- FindThreads.cmake	12 Sep 2008 14:56:20 -0000	1.18.2.1
***************
*** 9,12 ****
--- 9,13 ----
  INCLUDE (CheckIncludeFiles)
  INCLUDE (CheckLibraryExists)
+ SET(Threads_FOUND FALSE)
  
  # Do we have sproc?
***************
*** 31,34 ****
--- 32,36 ----
          SET(CMAKE_THREAD_LIBS_INIT "-lpthreads")
          SET(CMAKE_HAVE_THREADS_LIBRARY 1)
+         SET(Threads_FOUND TRUE)
        ENDIF(CMAKE_HAVE_PTHREADS_CREATE)
        # Ok, how about -lpthread
***************
*** 36,39 ****
--- 38,42 ----
        IF(CMAKE_HAVE_PTHREAD_CREATE)
          SET(CMAKE_THREAD_LIBS_INIT "-lpthread")
+         SET(Threads_FOUND TRUE)
          SET(CMAKE_HAVE_THREADS_LIBRARY 1)
        ENDIF(CMAKE_HAVE_PTHREAD_CREATE)
***************
*** 44,47 ****
--- 47,51 ----
            SET(CMAKE_THREAD_LIBS_INIT "-lthread")
            SET(CMAKE_HAVE_THREADS_LIBRARY 1)
+           SET(Threads_FOUND TRUE)
          ENDIF(CMAKE_HAVE_THR_CREATE)
        ENDIF(CMAKE_SYSTEM MATCHES "SunOS.*")
***************
*** 59,62 ****
--- 63,67 ----
          IF(THREADS_HAVE_PTHREAD_ARG)
            IF(THREADS_PTHREAD_ARG MATCHES "^2$")
+             SET(Threads_FOUND TRUE)
              MESSAGE(STATUS "Check if compiler accepts -pthread - yes")
            ELSE(THREADS_PTHREAD_ARG MATCHES "^2$")
***************
*** 74,77 ****
--- 79,83 ----
        ENDIF("THREADS_HAVE_PTHREAD_ARG" MATCHES "^THREADS_HAVE_PTHREAD_ARG")
        IF(THREADS_HAVE_PTHREAD_ARG)
+         SET(Threads_FOUND TRUE)
          SET(CMAKE_THREAD_LIBS_INIT "-pthread")
        ENDIF(THREADS_HAVE_PTHREAD_ARG)
***************
*** 82,89 ****
--- 88,97 ----
  IF(CMAKE_THREAD_LIBS_INIT)
    SET(CMAKE_USE_PTHREADS_INIT 1)
+   SET(Threads_FOUND TRUE)
  ENDIF(CMAKE_THREAD_LIBS_INIT)
  
  IF(CMAKE_SYSTEM MATCHES "Windows")
    SET(CMAKE_USE_WIN32_THREADS_INIT 1)
+   SET(Threads_FOUND TRUE)
  ENDIF(CMAKE_SYSTEM MATCHES "Windows")
  
***************
*** 102,105 ****
--- 110,114 ----
        SET(CMAKE_THREAD_LIBS_INIT "-lcma")
        SET(CMAKE_HP_PTHREADS_INIT 1)
+       SET(Threads_FOUND TRUE)
      ENDIF(CMAKE_HAVE_HP_CMA)
      SET(CMAKE_USE_PTHREADS_INIT 1)
***************
*** 113,116 ****
--- 122,126 ----
    IF(CMAKE_SYSTEM MATCHES "CYGWIN_NT*")
      SET(CMAKE_USE_PTHREADS_INIT 1)
+     SET(Threads_FOUND TRUE)
      SET(CMAKE_THREAD_LIBS_INIT )
      SET(CMAKE_USE_WIN32_THREADS_INIT 0)
***************
*** 118,119 ****
--- 128,131 ----
  ENDIF(CMAKE_USE_PTHREADS_INIT)
  
+ INCLUDE(FindPackageHandleStandardArgs)
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Threads DEFAULT_MSG Threads_FOUND)

Index: CMakeDetermineCXXCompiler.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CMakeDetermineCXXCompiler.cmake,v
retrieving revision 1.45.2.1
retrieving revision 1.45.2.2
diff -C 2 -d -r1.45.2.1 -r1.45.2.2
*** CMakeDetermineCXXCompiler.cmake	23 May 2008 20:09:34 -0000	1.45.2.1
--- CMakeDetermineCXXCompiler.cmake	12 Sep 2008 14:56:20 -0000	1.45.2.2
***************
*** 89,105 ****
  ENDIF (NOT _CMAKE_TOOLCHAIN_LOCATION)
  
- # if we have a g++ cross compiler, they have usually some prefix, like 
- # e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++
- # 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-gcc.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_CXX_COMPILER}" NAME)
-   IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
-     STRING(REGEX REPLACE "^(.+-)[gc]\\+\\+(\\.exe)?$"  "\\1" _CMAKE_TOOLCHAIN_PREFIX "${COMPILER_BASENAME}")
-   ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
- ENDIF (NOT _CMAKE_TOOLCHAIN_PREFIX)
- 
  # This block was used before the compiler was identified by building a
  # source file.  Unless g++ crashes when building a small C++
--- 89,92 ----
***************
*** 152,155 ****
--- 139,166 ----
  ENDIF(NOT CMAKE_CXX_COMPILER_ID_RUN)
  
+ # if we have a g++ cross compiler, they have usually some prefix, like 
+ # e.g. powerpc-linux-g++, arm-elf-g++ or i586-mingw32msvc-g++
+ # 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-gcc.exe", where BASENAME would be 
+ # "arm-unknown-nto-qnx6" instead of the correct "arm-unknown-nto-qnx6.3.0-"
+ IF (CMAKE_CROSSCOMPILING  
+     AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
+     AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+   GET_FILENAME_COMPONENT(COMPILER_BASENAME "${CMAKE_CXX_COMPILER}" NAME)
+   IF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
+     SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+   ENDIF (COMPILER_BASENAME MATCHES "^(.+-)[gc]\\+\\+(\\.exe)?$")
+ 
+   # if "llvm-" is part of the prefix, remove it, since llvm doesn't have its own binutils
+   # but uses the regular ar, objcopy, etc. (instead of llvm-objcopy etc.)
+   IF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+     SET(_CMAKE_TOOLCHAIN_PREFIX ${CMAKE_MATCH_1})
+   ENDIF ("${_CMAKE_TOOLCHAIN_PREFIX}" MATCHES "(.+-)?llvm-$")
+ 
+ ENDIF (CMAKE_CROSSCOMPILING  
+     AND "${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU"
+     AND NOT _CMAKE_TOOLCHAIN_PREFIX)
+ 
  INCLUDE(CMakeFindBinUtils)
  

Index: CheckCCompilerFlag.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/CheckCCompilerFlag.cmake,v
retrieving revision 1.1
retrieving revision 1.1.14.1
diff -C 2 -d -r1.1 -r1.1.14.1
*** CheckCCompilerFlag.cmake	18 Sep 2006 21:55:22 -0000	1.1
--- CheckCCompilerFlag.cmake	12 Sep 2008 14:56:20 -0000	1.1.14.1
***************
*** 4,7 ****
--- 4,11 ----
  #  FLAG - the compiler flag
  #  VARIABLE - variable to store the result
+ # 
+ #  This actually calls the check_c_source_compiles macro.
+ #  See help for CheckCSourceCompiles for a listing of variables
+ #  that can modify the build.
  
  # Copyright (c) 2006, Alexander Neundorf, <neundorf at kde.org>

Index: readme.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Modules/readme.txt,v
retrieving revision 1.14
retrieving revision 1.14.2.1
diff -C 2 -d -r1.14 -r1.14.2.1
*** readme.txt	29 Jan 2008 01:38:47 -0000	1.14
--- readme.txt	12 Sep 2008 14:56:20 -0000	1.14.2.1
***************
*** 68,85 ****
  A FindXXX.cmake module will typically be loaded by the command
  
!   FIND_PACKAGE(XXX [major[.minor[.patch]]] [EXACT]
                 [QUIET] [REQUIRED [components...]])
  
  If any version numbers are given to the command it will set the
! variable XXX_FIND_VERSION to contain the whole version.  The variables
! XXX_FIND_VERSION_MAJOR, XXX_FIND_VERSION_MINOR, and
! XXX_FIND_VERSION_PATCH will be set to contain the corresponding
! portions of the version number.  The variable XXX_FIND_VERSION_EXACT
! will indicate whether an exact version is requested.
  If the find module supports versioning it should locate a version of
  the package that is compatible with the version requested.  If a
  compatible version of the package cannot be found the module should
  not report success.  The version of the package found should be stored
! in the version variables named above.
  
  If the QUIET option is given to the command it will set the variable
--- 68,90 ----
  A FindXXX.cmake module will typically be loaded by the command
  
!   FIND_PACKAGE(XXX [major[.minor[.patch[.tweak]]]] [EXACT]
                 [QUIET] [REQUIRED [components...]])
  
  If any version numbers are given to the command it will set the
! following variables before loading the module:
! 
!   XXX_FIND_VERSION       = full requested version string
!   XXX_FIND_VERSION_MAJOR = major version if requested, else 0
!   XXX_FIND_VERSION_MINOR = minor version if requested, else 0
!   XXX_FIND_VERSION_PATCH = patch version if requested, else 0
!   XXX_FIND_VERSION_TWEAK = tweak version if requested, else 0
!   XXX_FIND_VERSION_COUNT = number of version components, 0 to 4
!   XXX_FIND_VERSION_EXACT = true if EXACT option was given
! 
  If the find module supports versioning it should locate a version of
  the package that is compatible with the version requested.  If a
  compatible version of the package cannot be found the module should
  not report success.  The version of the package found should be stored
! in "XXX_VERSION..." version variables docmented by the module.
  
  If the QUIET option is given to the command it will set the variable



More information about the Cmake-commits mailing list