diff options
author | Alexander Dorokhine <adorokhine@google.com> | 2020-02-20 12:36:32 -0800 |
---|---|---|
committer | Alexander Dorokhine <adorokhine@google.com> | 2020-02-20 12:42:10 -0800 |
commit | 0462c2d1927fb299d29010aee3e24c31fec67033 (patch) | |
tree | 4ba40ed860241426a1962fb936933e91e9efbf04 /share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in | |
parent | b684615c4e3b6a80e50026260746a43e6660a6bb (diff) | |
parent | 56ef56b3c52c03ad5680d505146183e49884dc03 (diff) | |
download | windows-x86-0462c2d1927fb299d29010aee3e24c31fec67033.tar.gz |
Merge remote-tracking branch 'origin/cmake-master-dev' into master
* origin/cmake-master-dev:
Upgrade cmake to 3.10.2
Remove file I added earlier to trigger a build.
Test CL
Add executable bit
Switch to 32-bit cmake
Update cmake (ab/4111459)
Add cmake 3.8.2 for tests
Update prebuilts to CMake 3.6.0-rc2 (go/ab/3043163).
Adding binaries for 3.2.3_vs2013
Bug: 149853706
Change-Id: Ifc4558efd71baa39ef08ecdb0f908697623bdd36
Diffstat (limited to 'share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in')
-rwxr-xr-x | share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in b/share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in new file mode 100755 index 0000000..de4a23a --- /dev/null +++ b/share/cmake-3.10/Modules/BasicConfigVersion-ExactVersion.cmake.in @@ -0,0 +1,47 @@ +# This is a basic version file for the Config-mode of find_package(). +# It is used by write_basic_package_version_file() as input file for configure_file() +# to create a version-file which can be installed along a config.cmake file. +# +# The created file sets PACKAGE_VERSION_EXACT if the current version string and +# the requested version string are exactly the same and it sets +# PACKAGE_VERSION_COMPATIBLE if the current version is equal to the requested version. +# The tweak version component is ignored. +# The variable CVF_VERSION must be set before calling configure_file(). + + +set(PACKAGE_VERSION "@CVF_VERSION@") + +if("@CVF_VERSION@" MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version + set(CVF_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") +else() + set(CVF_VERSION_NO_TWEAK "@CVF_VERSION@") +endif() + +if(PACKAGE_FIND_VERSION MATCHES "^([0-9]+\\.[0-9]+\\.[0-9]+)\\.") # strip the tweak version + set(REQUESTED_VERSION_NO_TWEAK "${CMAKE_MATCH_1}") +else() + set(REQUESTED_VERSION_NO_TWEAK "${PACKAGE_FIND_VERSION}") +endif() + +if(REQUESTED_VERSION_NO_TWEAK STREQUAL CVF_VERSION_NO_TWEAK) + 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 the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it: +if("${CMAKE_SIZEOF_VOID_P}" STREQUAL "" OR "@CMAKE_SIZEOF_VOID_P@" STREQUAL "") + return() +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() |