浏览代码

Merge pull request #3158 from yeswalrus/fix-policy-warning

Fix policy warning CMP0054
Feng Xiao 8 年之前
父节点
当前提交
471b45e895
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      cmake/protobuf-config-version.cmake.in

+ 2 - 2
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@)
 _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 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:
   # 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")
     math(EXPR installedBits "@CMAKE_SIZEOF_VOID_P@ * 8")
     set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
     set(PACKAGE_VERSION "${PACKAGE_VERSION} (${installedBits}bit)")
     set(PACKAGE_VERSION_UNSUITABLE TRUE)
     set(PACKAGE_VERSION_UNSUITABLE TRUE)