2019-03-31 23:04:45 +03:00
|
|
|
if(MSVC)
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
set(CMAKE_REQUIRED_LIBRARIES rt)
|
|
|
|
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)
|
|
|
|
|
2019-04-25 14:14:28 +00:00
|
|
|
if(APPLE)
|
|
|
|
add_definitions(-DFLAC__SYS_DARWIN)
|
|
|
|
endif()
|
2019-03-31 23:04:45 +03:00
|
|
|
|
|
|
|
add_executable(benchmark_residual benchmark_residual.c util.c)
|
|
|
|
target_include_directories(benchmark_residual PRIVATE
|
2019-04-29 12:48:24 +03:00
|
|
|
"$<TARGET_PROPERTY:FLAC,SOURCE_DIR>/include")
|
2019-03-31 23:04:45 +03:00
|
|
|
target_link_libraries(benchmark_residual
|
2019-04-29 12:48:24 +03:00
|
|
|
FLAC
|
2019-03-31 23:04:45 +03:00
|
|
|
$<$<BOOL:${HAVE_CLOCK_GETTIME}>:rt>)
|