1484543d1Sopenharmony_ci# ----------------------------------------------------------------------------- 2484543d1Sopenharmony_ci# Benchmarks 3484543d1Sopenharmony_ci# ----------------------------------------------------------------------------- 4484543d1Sopenharmony_ciset(FFRT_BENCHMARK_PATH ${PROJECT_SOURCE_DIR}/benchmarks) 5484543d1Sopenharmony_ciinclude_directories(${FFRT_BENCHMARK_PATH}) 6484543d1Sopenharmony_ci 7484543d1Sopenharmony_cioption(BENCHMARKS_BASE "Enables Benchmarks Base" ON) 8484543d1Sopenharmony_cioption(BENCHMARKS_FORK_JOIN "Enables Benchmarks Fork Join" ON) 9484543d1Sopenharmony_cioption(BENCHMARKS_FIB "Enables Benchmarks FIB" ON) 10484543d1Sopenharmony_cioption(BENCHMARKS_FACE_STORY "Enables Benchmarks Face Story" ON) 11484543d1Sopenharmony_cioption(BENCHMARKS_SPEEDUP "Enables Speedup test" ON) 12484543d1Sopenharmony_cioption(BENCHMARKS_SERIAL_SCHED_TIME "Enables completely serial schedule time test" ON) 13484543d1Sopenharmony_ci 14484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_BASE: " ${BENCHMARKS_BASE}) 15484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_FORK_JOIN: " ${BENCHMARKS_FORK_JOIN}) 16484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_FIB: " ${BENCHMARKS_FIB}) 17484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_FACE_STORY: " ${BENCHMARKS_FACE_STORY}) 18484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_SPEEDUP: " ${BENCHMARKS_SPEEDUP}) 19484543d1Sopenharmony_cimessage(STATUS "BENCHMARKS_SERIAL_SCHED_TIME: " ${BENCHMARKS_SERIAL_SCHED_TIME}) 20484543d1Sopenharmony_ci 21484543d1Sopenharmony_ciLINK_DIRECTORIES(${FFRT_BUILD_PATH}) 22484543d1Sopenharmony_ci 23484543d1Sopenharmony_ciset(FFRT_LD_FLAGS "-lffrt") 24484543d1Sopenharmony_ci 25484543d1Sopenharmony_ciif (BENCHMARKS_BASE STREQUAL ON) 26484543d1Sopenharmony_ci add_executable(base ${FFRT_BENCHMARK_PATH}/base/base.cpp) 27484543d1Sopenharmony_ci target_link_libraries(base ${FFRT_LD_FLAGS}) 28484543d1Sopenharmony_ciendif() 29484543d1Sopenharmony_ci 30484543d1Sopenharmony_ciif (BENCHMARKS_FIB STREQUAL ON) 31484543d1Sopenharmony_ci add_executable(fib ${FFRT_BENCHMARK_PATH}/fib/fib.cpp) 32484543d1Sopenharmony_ci target_link_libraries(fib ${FFRT_LD_FLAGS}) 33484543d1Sopenharmony_ciendif() 34484543d1Sopenharmony_ci 35484543d1Sopenharmony_ciif (BENCHMARKS_FORK_JOIN STREQUAL ON) 36484543d1Sopenharmony_ci add_executable(fork_join ${FFRT_BENCHMARK_PATH}/fork_join/fork_join.cpp) 37484543d1Sopenharmony_ci target_link_libraries(fork_join ${FFRT_LD_FLAGS}) 38484543d1Sopenharmony_ciendif() 39484543d1Sopenharmony_ci 40484543d1Sopenharmony_ciif (BENCHMARKS_FACE_STORY STREQUAL ON) 41484543d1Sopenharmony_ci add_executable(face_story ${FFRT_BENCHMARK_PATH}/face_story/face_story.cpp) 42484543d1Sopenharmony_ci target_link_libraries(face_story ${FFRT_LD_FLAGS}) 43484543d1Sopenharmony_ciendif() 44484543d1Sopenharmony_ci 45484543d1Sopenharmony_ci# speedup test 46484543d1Sopenharmony_ciif (BENCHMARKS_SPEEDUP STREQUAL ON) 47484543d1Sopenharmony_ci add_subdirectory(speedup) 48484543d1Sopenharmony_ciendif() 49484543d1Sopenharmony_ci 50484543d1Sopenharmony_ci# serial schedule time test 51484543d1Sopenharmony_ciif (BENCHMARKS_SERIAL_SCHED_TIME STREQUAL ON) 52484543d1Sopenharmony_ci add_subdirectory(serial_sched_time) 53484543d1Sopenharmony_ciendif()