Debian Codegraph @

third-party/tbb/examples/parallel_for/game_of_life/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(game_of_life CXX)
18
19 include(../../common/cmake/common.cmake)
20
21 set_common_project_settings(tbb)
22
23 add_executable(game_of_life Evolution.cpp Game_of_life.cpp Update_state.cpp)
24
25 target_compile_definitions(game_of_life PUBLIC _CONSOLE)
26 target_link_libraries(game_of_life TBB::tbb Threads::Threads)
27 target_compile_options(game_of_life PRIVATE ${TBB_CXX_STD_FLAG})
28
29 set(EXECUTABLE "$<TARGET_FILE:game_of_life>")
30 set(ARGS 2:4 -t 5)
31 set(LIGHT_ARGS 1:2 -t 5)
32
33 add_execution_target(run_game_of_life game_of_life ${EXECUTABLE} "${ARGS}")
34 add_execution_target(light_test_game_of_life game_of_life ${EXECUTABLE} "${LIGHT_ARGS}")