From: Kefu Chai Date: Mon, 26 Apr 2021 14:38:35 +0000 (+0800) Subject: cmake: check for empty string by its value X-Git-Tag: v17.1.0~2082^2~10 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=d275875b0e3d76bfe603dbc95e55e309e9b72e10;p=ceph.git cmake: check for empty string by its value 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 --- diff --git a/cmake/modules/FindStdFilesystem.cmake b/cmake/modules/FindStdFilesystem.cmake index 5d3336571ce9..c66f572459b6 100644 --- a/cmake/modules/FindStdFilesystem.cmake +++ b/cmake/modules/FindStdFilesystem.cmake @@ -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")