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 50f5fa3d71b2e8eed53e3a663189f995427c2dcd (commit) via c9761de7ad853c62aa2d7e0bc0a28bc697586d23 (commit) via 208bb9009bda2b41eeee747c34e536f561df8a59 (commit) from 83c00cdf9677682ab4761bfb6c00ef5497217e18 (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=50f5fa3d71b2e8eed53e3a663189f995427c2dcd commit 50f5fa3d71b2e8eed53e3a663189f995427c2dcd Merge: 83c00cd c9761de Author: Brad King <brad.k...@kitware.com> AuthorDate: Tue Aug 9 08:07:00 2011 -0400 Commit: CMake Topic Stage <kwro...@kitware.com> CommitDate: Tue Aug 9 08:07:00 2011 -0400 Merge topic 'WriteConfigVersionFile_2TemplateFiles' into next c9761de Improve documentation for WriteBasicConfigVersionFile.cmake 208bb90 Set UNSUITABLE instead of not COMPATIBLE http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c9761de7ad853c62aa2d7e0bc0a28bc697586d23 commit c9761de7ad853c62aa2d7e0bc0a28bc697586d23 Author: Alex Neundorf <neund...@kde.org> AuthorDate: Fri Aug 5 23:01:07 2011 +0200 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Fri Aug 5 23:01:07 2011 +0200 Improve documentation for WriteBasicConfigVersionFile.cmake Alex diff --git a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in index 469bcdb..cf53db8 100644 --- a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in +++ b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in @@ -1,5 +1,4 @@ -# This is a basic file for the new style find_package() search mode, -# i.e. Config-mode. +# This is a basic version file for the Config-mode of find_package(). # It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file() # to create a version-file which can be installed along a config.cmake file. # diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in index 8d091ea..2317fdb 100644 --- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in +++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in @@ -1,5 +1,4 @@ -# This is a basic file for the new style find_package() search mode, -# i.e. Config-mode. +# This is a basic version file for the Config-mode of find_package(). # It is used by WriteBasicConfigVersionFile.cmake as input file for configure_file() # to create a version-file which can be installed along a config.cmake file. # diff --git a/Modules/WriteBasicConfigVersionFile.cmake b/Modules/WriteBasicConfigVersionFile.cmake index f0ad6ea..0b6519d 100644 --- a/Modules/WriteBasicConfigVersionFile.cmake +++ b/Modules/WriteBasicConfigVersionFile.cmake @@ -5,23 +5,27 @@ # filename is the output filename, it should be in the build tree. # major.minor.patch is the version number of the project to be installed # The COMPATIBILITY mode AnyNewerVersion means that the installed package version -# will be considered suitable if it is newer or exactly the same as the requested version. +# will be considered compatible if it is newer or exactly the same as the requested version. # If SameMajorVersion is used instead, then the behaviour differs from AnyNewerVersion # in that the major version number must be the same as requested, e.g. version 2.0 will -# not be considered suitable to 1.0 is requested. -# If you project has more elaborated version matching rules, you will need to write your -# own custom ConfigVersion.cmake file, instead of using this macro. +# not be considered compatible if 1.0 is requested. +# If your project has more elaborated version matching rules, you will need to write your +# own custom ConfigVersion.cmake file instead of using this macro. # # Example: # write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake # VERSION 1.2.3 # COMPATIBILITY SameMajorVersion ) # install(FILES ${CMAKE_CURRENT_BINARY_DIR}/FooConfigVersion.cmake +# ${CMAKE_CURRENT_BINARY_DIR}/FooConfig.cmake # DESTINATION lib/cmake/Foo ) # -# Internally, this macro executes configure_file() on the input file -# Modules/BasicConfigVersion-AnyNewerVersion/SameMajorVersion.cmake.in to -# create the resulting version file. +# Internally, this macro executes configure_file() to create the resulting +# version file. Depending on the COMPATIBLITY, either the file +# BasicConfigVersion-SameMajorVersion.cmake.in or BasicConfigVersion-AnyNewerVersion.cmake.in +# is used. Please note that these two files are internal to CMake and you should +# not call configure_file() on them yourself, but they can be used as starting +# point to create more sophisticted custom ConfigVersion.cmake files. #============================================================================= # Copyright 2008-2011 Alexander Neundorf, <neund...@kde.org> http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=208bb9009bda2b41eeee747c34e536f561df8a59 commit 208bb9009bda2b41eeee747c34e536f561df8a59 Author: Alex Neundorf <neund...@kde.org> AuthorDate: Fri Aug 5 22:42:57 2011 +0200 Commit: Alex Neundorf <neund...@kde.org> CommitDate: Fri Aug 5 22:42:57 2011 +0200 Set UNSUITABLE instead of not COMPATIBLE Alex diff --git a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in index 30749c4..469bcdb 100644 --- a/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in +++ b/Modules/BasicConfigVersion-AnyNewerVersion.cmake.in @@ -10,22 +10,18 @@ set(PACKAGE_VERSION "@CVF_VERSION@") -set(PACKAGE_VERSION_EXACT FALSE) # initialize to FALSE +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) +else() + set(PACKAGE_VERSION_COMPATIBLE TRUE) + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() # check that the installed version has the same 32/64bit-ness as the one which is currently searching: if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_COMPATIBLE FALSE) -else() - - if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) - set(PACKAGE_VERSION_COMPATIBLE FALSE) - else() - set(PACKAGE_VERSION_COMPATIBLE TRUE) - if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() - endif() - -endif() \ No newline at end of file + set(PACKAGE_VERSION_UNSUITABLE TRUE) +endif() diff --git a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in index f633ee8..8d091ea 100644 --- a/Modules/BasicConfigVersion-SameMajorVersion.cmake.in +++ b/Modules/BasicConfigVersion-SameMajorVersion.cmake.in @@ -12,34 +12,31 @@ set(PACKAGE_VERSION "@CVF_VERSION@") -set(PACKAGE_VERSION_EXACT FALSE) # initialize to FALSE - -# check that the installed version has the same 32/64bit-ness as the one which is currently searching: -if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") - math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") - set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") - set(PACKAGE_VERSION_COMPATIBLE FALSE) +if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) + set(PACKAGE_VERSION_COMPATIBLE FALSE) else() - if("${PACKAGE_VERSION}" VERSION_LESS "${PACKAGE_FIND_VERSION}" ) - set(PACKAGE_VERSION_COMPATIBLE FALSE) + if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.") + set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") else() + set(CVF_VERSION_MAJOR "@CVF_VERSION@") + endif() - if("@CVF_VERSION@" MATCHES "^([0-9]+)\\.") - set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}") - else() - set(CVF_VERSION_MAJOR "@CVF_VERSION@") - endif() - - if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${CVF_VERSION_MAJOR}") - set(PACKAGE_VERSION_COMPATIBLE TRUE) - else() - set(PACKAGE_VERSION_COMPATIBLE FALSE) - endif() - - if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") - set(PACKAGE_VERSION_EXACT TRUE) - endif() + if("${PACKAGE_FIND_VERSION_MAJOR}" STREQUAL "${CVF_VERSION_MAJOR}") + set(PACKAGE_VERSION_COMPATIBLE TRUE) + else() + set(PACKAGE_VERSION_COMPATIBLE FALSE) endif() + if( "${PACKAGE_FIND_VERSION}" STREQUAL "${PACKAGE_VERSION}") + set(PACKAGE_VERSION_EXACT TRUE) + endif() +endif() + + +# check that the installed version has the same 32/64bit-ness as the one which is currently searching: +if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "@CMAKE_SIZEOF_VOID_P@") + math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8") + set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)") + set(PACKAGE_VERSION_UNSUITABLE TRUE) endif() diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index ca64440..9a4bdfe 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -350,12 +350,16 @@ write_basic_config_version_file(${CMAKE_CURRENT_BINARY_DIR}/Boo123ConfigVersion. VERSION 1.2.3 COMPATIBILITY SameMajorVersion) +set(PACKAGE_VERSION_EXACT FALSE) set(PACKAGE_FIND_VERSION 2.3.4) set(PACKAGE_FIND_VERSION_MAJOR 2) include(${CMAKE_CURRENT_BINARY_DIR}/Boo123ConfigVersion.cmake) if(PACKAGE_VERSION_COMPATIBLE) message(SEND_ERROR "Found Boo123 with version 1.2.3, but 2.3.4 was requested !") endif() +if(PACKAGE_VERSION_EXACT) + message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !") +endif() set(PACKAGE_FIND_VERSION 0.0.1) set(PACKAGE_FIND_VERSION_MAJOR 0) @@ -363,6 +367,9 @@ include(${CMAKE_CURRENT_BINARY_DIR}/Boo123ConfigVersion.cmake) if(PACKAGE_VERSION_COMPATIBLE) message(SEND_ERROR "Found Boo123 with version 1.2.3, but 0.0.1 was requested !") endif() +if(PACKAGE_VERSION_EXACT) + message(SEND_ERROR "PACKAGE_VERSION_EXACT set, although it should not be !") +endif() set(PACKAGE_FIND_VERSION 1.0.0) set(PACKAGE_FIND_VERSION_MAJOR 1) @@ -383,3 +390,7 @@ endif() if(NOT PACKAGE_VERSION_EXACT) message(SEND_ERROR "PACKAGE_VERSION_EXACT not set, although it should be !") endif() + +if(PACKAGE_VERSION_UNSUITABLE) + message(SEND_ERROR "PACKAGE_VERSION_UNSUITABLE set, but must not be !") +endif() ----------------------------------------------------------------------- Summary of changes: .../BasicConfigVersion-AnyNewerVersion.cmake.in | 27 +++++------- .../BasicConfigVersion-SameMajorVersion.cmake.in | 48 +++++++++----------- Modules/WriteBasicConfigVersionFile.cmake | 18 +++++--- Tests/FindPackageTest/CMakeLists.txt | 11 +++++ 4 files changed, 55 insertions(+), 49 deletions(-) hooks/post-receive -- CMake _______________________________________________ Cmake-commits mailing list Cmake-commits@cmake.org http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-commits