]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cmake: check for empty string by its value
authorKefu Chai <kchai@redhat.com>
Mon, 26 Apr 2021 14:38:35 +0000 (22:38 +0800)
committerKefu Chai <kchai@redhat.com>
Sun, 2 May 2021 00:15:15 +0000 (08:15 +0800)
the behavior of cmake 3.17 is a little bit different as it consider

NOT _library STREQUAL ""

as true, if ${_library} is "".

Signed-off-by: Kefu Chai <kchai@redhat.com>
cmake/modules/FindStdFilesystem.cmake

index 5d3336571ce980eb85f485cfeaf15d5c2e01a30f..c66f572459b6601daaa09dd7556a8ae82c2bd4a0 100644 (file)
@@ -14,7 +14,7 @@ macro(try_std_filesystem_library _library _result _already_included)
     ${_std_filesystem_try_compile_arg})
   unset(_std_filesystem_try_compile_arg)
   if(_std_filesystem_compiles)
-    if(NOT _library STREQUAL "")
+    if(NOT ${_library} STREQUAL "")
       set(${_result} ${_library})
     else()
       set(${_already_included} "included by standard library")