From 986a2438b39f1079d65f90358d79a45c7463562d Mon Sep 17 00:00:00 2001 From: Alex Lorenz Date: Wed, 19 Jul 2023 02:23:01 -0700 Subject: [PATCH] =?UTF-8?q?[swift]=20make=20sure=20the=20flow=5Fsampling?= =?UTF-8?q?=20target=20depends=20on=20the=20flow=20Swift=20=E2=80=A6=20(#1?= =?UTF-8?q?0641)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [swift] make sure the flow_sampling target depends on the flow Swift generated header * [swift] Allow the googlebenmark g++ to be used with Clang and libstdc++ combination --- flow/CMakeLists.txt | 1 + flowbench/CMakeLists.txt | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/flow/CMakeLists.txt b/flow/CMakeLists.txt index 283b9284a9..7cdcfaddb7 100644 --- a/flow/CMakeLists.txt +++ b/flow/CMakeLists.txt @@ -209,4 +209,5 @@ if (WITH_SWIFT) # TODO(swift): rdar://99107402 - this will only work once CMake 3.25 is released: # target_link_libraries(flow PRIVATE flow_swift) add_dependencies(flow flow_swift) + add_dependencies(flow_sampling flow_swift) endif() # WITH SWIFT diff --git a/flowbench/CMakeLists.txt b/flowbench/CMakeLists.txt index 7aabd55b52..50d7e27b31 100644 --- a/flowbench/CMakeLists.txt +++ b/flowbench/CMakeLists.txt @@ -5,11 +5,11 @@ fdb_find_sources(FLOWBENCH_SRCS) # There is no good way to incorporate the recommended googlebenchmark download + build # process with one that checks to see if googlebenchmark has already been downloaded # and built. -if(EXISTS /opt/googlebenchmark-f91b6b AND CLANG) +if(EXISTS /opt/googlebenchmark-f91b6b AND CLANG AND USE_LIBCXX) add_flow_target(EXECUTABLE NAME flowbench SRCS ${FLOWBENCH_SRCS}) target_include_directories(flowbench PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" /opt/googlebenchmark-f91b6b/include) target_link_directories(flowbench PRIVATE /opt/googlebenchmark-f91b6b/lib64) -elseif(EXISTS /opt/googlebenchmark-f91b6b-g++ AND NOT CLANG) +elseif(EXISTS /opt/googlebenchmark-f91b6b-g++ AND NOT USE_LIBCXX) add_flow_target(EXECUTABLE NAME flowbench SRCS ${FLOWBENCH_SRCS}) target_include_directories(flowbench PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/include" "${CMAKE_CURRENT_BINARY_DIR}/include" /opt/googlebenchmark-f91b6b-g++/include) target_link_directories(flowbench PRIVATE /opt/googlebenchmark-f91b6b-g++/lib64)