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(sub_string_finder_simple CXX) 18project(sub_string_finder_extended CXX) 19project(sub_string_finder_pretty CXX) 20 21include(../../common/cmake/common.cmake) 22 23set_common_project_settings(tbb) 24 25add_executable(sub_string_finder_simple sub_string_finder.cpp) 26add_executable(sub_string_finder_extended sub_string_finder_extended.cpp) 27add_executable(sub_string_finder_pretty sub_string_finder_pretty.cpp) 28 29target_link_libraries(sub_string_finder_simple TBB::tbb Threads::Threads) 30target_link_libraries(sub_string_finder_extended TBB::tbb Threads::Threads) 31target_link_libraries(sub_string_finder_pretty TBB::tbb Threads::Threads) 32 33target_compile_options(sub_string_finder_simple PRIVATE ${TBB_CXX_STD_FLAG}) 34target_compile_options(sub_string_finder_extended PRIVATE ${TBB_CXX_STD_FLAG}) 35target_compile_options(sub_string_finder_pretty PRIVATE ${TBB_CXX_STD_FLAG}) 36 37add_custom_target(sub_string_finder) 38add_dependencies(sub_string_finder sub_string_finder_simple sub_string_finder_extended sub_string_finder_pretty) 39 40set(EXECUTABLE "$<TARGET_FILE:sub_string_finder_extended>") 41set(LIGHT_EXECUTABLE "$<TARGET_FILE:sub_string_finder_simple>") 42set(ARGS "") 43set(LIGHT_ARGS "silent") 44 45add_execution_target(run_sub_string_finder sub_string_finder ${EXECUTABLE} "${ARGS}") 46add_execution_target(light_test_sub_string_finder sub_string_finder ${LIGHT_EXECUTABLE} "${LIGHT_ARGS}") 47