[Cmake-commits] [cmake-commits] king committed CMakeLists.txt 1.10 1.11 FindVersionTestA.cmake 1.1 1.2 FindVersionTestB.cmake 1.1 1.2 FindVersionTestC.cmake 1.1 1.2 FindVersionTestD.cmake NONE 1.1

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Sep 10 10:11:50 EDT 2008


Update of /cvsroot/CMake/CMake/Tests/FindPackageTest
In directory public:/mounts/ram/cvs-serv14471/Tests/FindPackageTest

Modified Files:
	CMakeLists.txt FindVersionTestA.cmake FindVersionTestB.cmake 
	FindVersionTestC.cmake 
Added Files:
	FindVersionTestD.cmake 
Log Message:
ENH: Improve find_package version numbering

Make the number of version components specified explicitly available.
Set variables for unspecified version components to "0" instead of
leaving them unset.  This simplifies version number handling for find-
and config-modules.  Also support a fourth "tweak" version component
since some packages use them.


Index: FindVersionTestA.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/FindPackageTest/FindVersionTestA.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** FindVersionTestA.cmake	21 Jan 2008 13:48:33 -0000	1.1
--- FindVersionTestA.cmake	10 Sep 2008 14:11:48 -0000	1.2
***************
*** 5,12 ****
    MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MAJOR=${VersionTestA_FIND_VERSION_MAJOR} is not 1")
  ENDIF(NOT "${VersionTestA_FIND_VERSION_MAJOR}" STREQUAL "1")
! IF(DEFINED VersionTestA_FIND_VERSION_MINOR)
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MINOR should not be defined")
! ENDIF(DEFINED VersionTestA_FIND_VERSION_MINOR)
! IF(DEFINED VersionTestA_FIND_VERSION_PATCH)
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_PATCH should not be defined")
! ENDIF(DEFINED VersionTestA_FIND_VERSION_PATCH)
--- 5,18 ----
    MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MAJOR=${VersionTestA_FIND_VERSION_MAJOR} is not 1")
  ENDIF(NOT "${VersionTestA_FIND_VERSION_MAJOR}" STREQUAL "1")
! IF(NOT "${VersionTestA_FIND_VERSION_MINOR}" STREQUAL "0")
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_MINOR=${VersionTestA_FIND_VERSION_MINOR} is not 0")
! ENDIF(NOT "${VersionTestA_FIND_VERSION_MINOR}" STREQUAL "0")
! IF(NOT "${VersionTestA_FIND_VERSION_PATCH}" STREQUAL "0")
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_PATCH=${VersionTestA_FIND_VERSION_PATCH} is not 0")
! ENDIF(NOT "${VersionTestA_FIND_VERSION_PATCH}" STREQUAL "0")
! IF(NOT "${VersionTestA_FIND_VERSION_TWEAK}" STREQUAL "0")
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_TWEAK=${VersionTestA_FIND_VERSION_TWEAK} is not 0")
! ENDIF(NOT "${VersionTestA_FIND_VERSION_TWEAK}" STREQUAL "0")
! IF(NOT "${VersionTestA_FIND_VERSION_COUNT}" STREQUAL "1")
!   MESSAGE(SEND_ERROR "VersionTestA_FIND_VERSION_COUNT=${VersionTestA_FIND_VERSION_COUNT} is not 1")
! ENDIF(NOT "${VersionTestA_FIND_VERSION_COUNT}" STREQUAL "1")

Index: FindVersionTestB.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/FindPackageTest/FindVersionTestB.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** FindVersionTestB.cmake	21 Jan 2008 13:48:33 -0000	1.1
--- FindVersionTestB.cmake	10 Sep 2008 14:11:48 -0000	1.2
***************
*** 8,12 ****
    MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_MINOR=${VersionTestB_FIND_VERSION_MINOR} is not 2")
  ENDIF(NOT "${VersionTestB_FIND_VERSION_MINOR}" STREQUAL "2")
! IF(DEFINED VersionTestB_FIND_VERSION_PATCH)
!   MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_PATCH should not be defined")
! ENDIF(DEFINED VersionTestB_FIND_VERSION_PATCH)
--- 8,18 ----
    MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_MINOR=${VersionTestB_FIND_VERSION_MINOR} is not 2")
  ENDIF(NOT "${VersionTestB_FIND_VERSION_MINOR}" STREQUAL "2")
! IF(NOT "${VersionTestB_FIND_VERSION_PATCH}" STREQUAL "0")
!   MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_PATCH=${VersionTestB_FIND_VERSION_PATCH} is not 0")
! ENDIF(NOT "${VersionTestB_FIND_VERSION_PATCH}" STREQUAL "0")
! IF(NOT "${VersionTestB_FIND_VERSION_TWEAK}" STREQUAL "0")
!   MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_TWEAK=${VersionTestB_FIND_VERSION_TWEAK} is not 0")
! ENDIF(NOT "${VersionTestB_FIND_VERSION_TWEAK}" STREQUAL "0")
! IF(NOT "${VersionTestB_FIND_VERSION_COUNT}" STREQUAL "2")
!   MESSAGE(SEND_ERROR "VersionTestB_FIND_VERSION_COUNT=${VersionTestB_FIND_VERSION_COUNT} is not 2")
! ENDIF(NOT "${VersionTestB_FIND_VERSION_COUNT}" STREQUAL "2")

Index: FindVersionTestC.cmake
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/FindPackageTest/FindVersionTestC.cmake,v
retrieving revision 1.1
retrieving revision 1.2
diff -C 2 -d -r1.1 -r1.2
*** FindVersionTestC.cmake	21 Jan 2008 13:48:33 -0000	1.1
--- FindVersionTestC.cmake	10 Sep 2008 14:11:48 -0000	1.2
***************
*** 11,12 ****
--- 11,18 ----
    MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_PATCH=${VersionTestC_FIND_VERSION_PATCH} is not 3")
  ENDIF(NOT "${VersionTestC_FIND_VERSION_PATCH}" STREQUAL "3")
+ IF(NOT "${VersionTestC_FIND_VERSION_TWEAK}" STREQUAL "0")
+   MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_TWEAK=${VersionTestC_FIND_VERSION_TWEAK} is not 0")
+ ENDIF(NOT "${VersionTestC_FIND_VERSION_TWEAK}" STREQUAL "0")
+ IF(NOT "${VersionTestC_FIND_VERSION_COUNT}" STREQUAL "3")
+   MESSAGE(SEND_ERROR "VersionTestC_FIND_VERSION_COUNT=${VersionTestC_FIND_VERSION_COUNT} is not 3")
+ ENDIF(NOT "${VersionTestC_FIND_VERSION_COUNT}" STREQUAL "3")

--- NEW FILE: FindVersionTestD.cmake ---
IF(NOT "${VersionTestD_FIND_VERSION}" STREQUAL "1.2.3.4")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION=${VersionTestD_FIND_VERSION} is not 1.2.3.4")
ENDIF(NOT "${VersionTestD_FIND_VERSION}" STREQUAL "1.2.3.4")
IF(NOT "${VersionTestD_FIND_VERSION_MAJOR}" STREQUAL "1")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION_MAJOR=${VersionTestD_FIND_VERSION_MAJOR} is not 1")
ENDIF(NOT "${VersionTestD_FIND_VERSION_MAJOR}" STREQUAL "1")
IF(NOT "${VersionTestD_FIND_VERSION_MINOR}" STREQUAL "2")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION_MINOR=${VersionTestD_FIND_VERSION_MINOR} is not 2")
ENDIF(NOT "${VersionTestD_FIND_VERSION_MINOR}" STREQUAL "2")
IF(NOT "${VersionTestD_FIND_VERSION_PATCH}" STREQUAL "3")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION_PATCH=${VersionTestD_FIND_VERSION_PATCH} is not 3")
ENDIF(NOT "${VersionTestD_FIND_VERSION_PATCH}" STREQUAL "3")
IF(NOT "${VersionTestD_FIND_VERSION_TWEAK}" STREQUAL "4")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION_TWEAK=${VersionTestD_FIND_VERSION_TWEAK} is not 4")
ENDIF(NOT "${VersionTestD_FIND_VERSION_TWEAK}" STREQUAL "4")
IF(NOT "${VersionTestD_FIND_VERSION_COUNT}" STREQUAL "4")
  MESSAGE(SEND_ERROR "VersionTestD_FIND_VERSION_COUNT=${VersionTestD_FIND_VERSION_COUNT} is not 4")
ENDIF(NOT "${VersionTestD_FIND_VERSION_COUNT}" STREQUAL "4")

Index: CMakeLists.txt
===================================================================
RCS file: /cvsroot/CMake/CMake/Tests/FindPackageTest/CMakeLists.txt,v
retrieving revision 1.10
retrieving revision 1.11
diff -C 2 -d -r1.10 -r1.11
*** CMakeLists.txt	9 Jun 2008 19:09:14 -0000	1.10
--- CMakeLists.txt	10 Sep 2008 14:11:48 -0000	1.11
***************
*** 28,31 ****
--- 28,32 ----
  FIND_PACKAGE(VersionTestB 1.2)
  FIND_PACKAGE(VersionTestC 1.2.3)
+ FIND_PACKAGE(VersionTestD 1.2.3.4)
  
  #-----------------------------------------------------------------------------



More information about the Cmake-commits mailing list