]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/libs/beast/test/beast/CMakeLists.txt
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / libs / beast / test / beast / CMakeLists.txt
index 4d486fe64d457b6aa0ad49663535bdbcc549af46..cb3c1eb50a7fdf93224f27ed8e7247337f40aa57 100644 (file)
@@ -7,6 +7,30 @@
 # Official repository: https://github.com/boostorg/beast
 #
 
+function(build_individual_tests prefix)
+    set(options )
+    set(oneValueArgs )
+    set(multiValueArgs EXCLUDE LIBS EXTRA)
+    cmake_parse_arguments(bit "${options}"
+            "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
+
+    file(GLOB test_srcs "*.cpp")
+    set(individual_tests)
+    foreach(test_src IN LISTS test_srcs)
+        get_filename_component(test_suffix "${test_src}" NAME_WE)
+        if(NOT test_suffix IN_LIST bit_EXCLUDE)
+            set(test_name "${prefix}-${test_suffix}")
+            add_executable("${test_name}" EXCLUDE_FROM_ALL "${test_src}")
+            foreach(lib IN LISTS bit_LIBS)
+                target_link_libraries("${test_name}" "${lib}")
+            endforeach()
+            list(APPEND individual_tests COMMAND "${test_name}")
+        endif()
+    endforeach()
+
+    add_custom_target("${prefix}-all" ${individual_tests})
+endfunction()
+
 add_definitions (-DBOOST_BEAST_ALLOW_DEPRECATED)
 
 # For buffers_cat
@@ -44,3 +68,12 @@ target_link_libraries(tests-beast
     lib-test)
 
 set_property(TARGET tests-beast PROPERTY FOLDER "tests")
+
+add_custom_target(tests-beast-all
+        DEPENDS
+            tests-beast-_experimental-all
+            tests-beast-core-all
+            tests-beast-http-all
+            tests-beast-ssl-all
+            tests-beast-websocket-all
+            tests-beast-zlib-all )
\ No newline at end of file