aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake
diff options
context:
space:
mode:
authorGravatar Feng Xiao <xfxyjwf@gmail.com>2017-09-13 15:15:04 -0700
committerGravatar GitHub <noreply@github.com>2017-09-13 15:15:04 -0700
commit471b45e895c1925bf6a1250be9ad9ade161703b8 (patch)
treec3dc5c034089013eb735b15f9f39dfaa9c1d653b /cmake
parent06aa8dc9e730cc39c67d0ff9c0c95e645ccf03c9 (diff)
parentd8c5865e253b26942c03ac7a89fc5d6c6a707e0c (diff)
Merge pull request #3158 from yeswalrus/fix-policy-warning
Fix policy warning CMP0054
Diffstat (limited to 'cmake')
-rw-r--r--cmake/protobuf-config-version.cmake.in4
1 files changed, 2 insertions, 2 deletions
diff --git a/cmake/protobuf-config-version.cmake.in b/cmake/protobuf-config-version.cmake.in
index ca6da09a..3fa01763 100644
--- a/cmake/protobuf-config-version.cmake.in
+++ b/cmake/protobuf-config-version.cmake.in
@@ -49,9 +49,9 @@ _check_and_save_build_option(MSVC_STATIC_RUNTIME @protobuf_MSVC_STATIC_RUNTIME@)
_check_and_save_build_option(BUILD_SHARED_LIBS @protobuf_BUILD_SHARED_LIBS@)
# if the installed or the using project don't have CMAKE_SIZEOF_VOID_P set, ignore it:
-if(NOT "${CMAKE_SIZEOF_VOID_P}" STREQUAL "" AND NOT "@CMAKE_SIZEOF_VOID_P@" STREQUAL "")
+if(CMAKE_SIZEOF_VOID_P AND "@CMAKE_SIZEOF_VOID_P@")
# 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@")
+ if(NOT CMAKE_SIZEOF_VOID_P EQUAL "@CMAKE_SIZEOF_VOID_P@")
math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
set(PACKAGE_VERSION_UNSUITABLE TRUE)