]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
cmake: tidy-up `NOT_NEED_LBER_H` detection
authorViktor Szakats <commit@vsz.me>
Mon, 2 Oct 2023 22:56:02 +0000 (22:56 +0000)
committerViktor Szakats <commit@vsz.me>
Mon, 2 Oct 2023 22:58:37 +0000 (22:58 +0000)
Follow-up to 772f0d8edf1c3c2745543f42388ccec5a16ee2c0 #12006

CMakeLists.txt

index d8cc9cfe6881c00310e7e907251c357dd972e168..f1de3843a0247b5248ca68388ad196d59b0fe6a5 100644 (file)
@@ -808,8 +808,7 @@ if(NOT CURL_DISABLE_LDAP)
         list(APPEND CMAKE_REQUIRED_LIBRARIES ${CMAKE_LBER_LIB})
       endif()
 
-      set(_SRC_STRING
-        "
+      check_c_source_compiles("
         ${_INCLUDE_STRING}
         int main(int argc, char ** argv)
         {
@@ -817,9 +816,7 @@ if(NOT CURL_DISABLE_LDAP)
           BerElement *bep = ber_init(bvp);
           ber_free(bep, 1);
           return 0;
-        }"
-      )
-      check_c_source_compiles("${_SRC_STRING}" NOT_NEED_LBER_H)
+        }" NOT_NEED_LBER_H)
       if(NOT_NEED_LBER_H)
         set(NEED_LBER_H OFF)
       else()