1# Copyright (c) 2020-2023 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
15cmake_minimum_required(VERSION 3.5)
16
17project(parallel_preorder CXX)
18
19include(../../common/cmake/common.cmake)
20
21set_common_project_settings(tbb)
22
23add_executable(parallel_preorder parallel_preorder.cpp Graph.cpp main.cpp)
24
25target_link_libraries(parallel_preorder TBB::tbb Threads::Threads)
26target_compile_options(parallel_preorder PRIVATE ${TBB_CXX_STD_FLAG})
27
28set(EXECUTABLE "$<TARGET_FILE:parallel_preorder>")
29set(ARGS "")
30set(PERF_ARGS auto silent 500000 100)
31set(LIGHT_ARGS 1:auto:+4 n-of-traversals=50)
32
33add_execution_target(run_parallel_preorder parallel_preorder ${EXECUTABLE} "${ARGS}")
34add_execution_target(perf_run_parallel_preorder parallel_preorder ${EXECUTABLE} "${PERF_ARGS}")
35add_execution_target(light_test_parallel_preorder parallel_preorder ${EXECUTABLE} "${LIGHT_ARGS}")