summaryrefslogtreecommitdiff
path: root/microbench/CMakeLists.txt
blob: c43814fd2613cb48a29278232c7a59ca481cc55c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
if(MSVC)
    return()
endif()

set(CMAKE_REQUIRED_LIBRARIES rt)
check_function_exists(clock_gettime HAVE_CLOCK_GETTIME)

if(APPLE)
    add_definitions(-DFLAC__SYS_DARWIN)
endif()

add_executable(benchmark_residual benchmark_residual.c util.c)
target_include_directories(benchmark_residual PRIVATE
    "$<TARGET_PROPERTY:FLAC-static,SOURCE_DIR>/include")
target_link_libraries(benchmark_residual
    FLAC-static
    $<$<BOOL:${HAVE_CLOCK_GETTIME}>:rt>)