Debian Codegraph @

third-party/tbb/examples/parallel_reduce/convex_hull/CMakeLists.txt

raw
1 # Copyright (c) 2020-2025 Intel Corporation
2 #
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
6 #
7 # http://www.apache.org/licenses/LICENSE-2.0
8 #
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
14
15 cmake_minimum_required(VERSION 3.5.0...3.31.3)
16
17 project(convex_hull_bench CXX)
18 project(convex_hull_sample CXX)
19
20 include(../../common/cmake/common.cmake)
21
22 set_common_project_settings(tbb)
23
24 add_executable(convex_hull_bench convex_hull_bench.cpp)
25 add_executable(convex_hull_sample convex_hull_sample.cpp)
26
27 target_link_libraries(convex_hull_bench TBB::tbb Threads::Threads)
28 target_link_libraries(convex_hull_sample TBB::tbb Threads::Threads)
29
30 target_compile_options(convex_hull_bench PRIVATE ${TBB_CXX_STD_FLAG})
31 target_compile_options(convex_hull_sample PRIVATE ${TBB_CXX_STD_FLAG})
32
33 add_custom_target(convex_hull)
34 add_dependencies(convex_hull convex_hull_bench convex_hull_sample)
35
36 set(EXECUTABLE "$<TARGET_FILE:convex_hull_bench>")
37 set(PERF_EXECUTABLE "$<TARGET_FILE:convex_hull_sample>")
38 set(ARGS "")
39 set(LIGHT_ARGS 4 400)
40 set(PERF_ARGS silent auto 40000000)
41
42 add_execution_target(run_convex_hull convex_hull ${EXECUTABLE} "${ARGS}")
43 add_execution_target(light_test_convex_hull convex_hull ${EXECUTABLE} "${LIGHT_ARGS}")
44 add_execution_target(perf_run_convex_hull convex_hull ${PERF_EXECUTABLE} "${PERF_ARGS}")