From: Viktor Szakats Date: Mon, 2 Oct 2023 22:56:02 +0000 (+0000) Subject: cmake: tidy-up `NOT_NEED_LBER_H` detection X-Git-Tag: curl-8_4_0~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4e8a3a1fc83b98c8803eb81124d2e7d9ca0b5974;p=thirdparty%2Fcurl.git cmake: tidy-up `NOT_NEED_LBER_H` detection Follow-up to 772f0d8edf1c3c2745543f42388ccec5a16ee2c0 #12006 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d8cc9cfe68..f1de3843a0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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()