tests: wrap testsasl with LIBMEMCACHED_WITH_SASL_SUPPORT
authorMichael Wallner <mike@php.net>
Tue, 18 Feb 2020 12:53:16 +0000 (13:53 +0100)
committerMichael Wallner <mike@php.net>
Tue, 18 Feb 2020 12:53:16 +0000 (13:53 +0100)
tests/libmemcached-1.0/CMakeLists.txt

index a92b50fe3348724f856b4b7143b8220ec5c2a050..fe7dc133b672e38967f89e8c392eb953e26f1be1 100644 (file)
@@ -3,32 +3,34 @@ add_executable(internals internals.cc string.cc)
 target_link_libraries(internals PRIVATE libtest libmemcachedinternal Threads::Threads)
 add_test(internals internals)
 
-add_executable(testsasl
-        basic.cc
-        debug.cc
-        deprecated.cc
-        error_conditions.cc
-        ketama.cc
-        namespace.cc
-        parser.cc
-        pool.cc
-        print.cc
-        replication.cc
-        sasl.cc
-        virtual_buckets.cc
-        callback_counter.cc
-        fetch_all_results.cc
-        generate.cc
-        )
-target_link_libraries(testsasl PRIVATE
-        libclient_utilities
-        libhashkit
-        libmemcached
-        libmemcachedutil
-        libtest
-        Threads::Threads
-        )
-add_test(testsasl testsasl)
+if(LIBMEMCACHED_WITH_SASL_SUPPORT)
+    add_executable(testsasl
+            basic.cc
+            debug.cc
+            deprecated.cc
+            error_conditions.cc
+            ketama.cc
+            namespace.cc
+            parser.cc
+            pool.cc
+            print.cc
+            replication.cc
+            sasl.cc
+            virtual_buckets.cc
+            callback_counter.cc
+            fetch_all_results.cc
+            generate.cc
+            )
+    target_link_libraries(testsasl PRIVATE
+            libclient_utilities
+            libhashkit
+            libmemcached
+            libmemcachedutil
+            libtest
+            Threads::Threads
+            )
+    add_test(testsasl testsasl)
+endif()
 
 add_executable(atomsmasher atomsmasher.cc)
 add_executable(testplus plus.cpp)