summaryrefslogtreecommitdiffstats
path: root/microbench/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-05 13:14:37 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-05 13:14:37 +0000
commitfd3b2704efc2b206784615c1a23eb25501842259 (patch)
tree61ba3a8af2a0ae2ac9ec362bbf18b038f5dc0448 /microbench/CMakeLists.txt
parentInitial commit. (diff)
downloadflac-upstream.tar.xz
flac-upstream.zip
Adding upstream version 1.4.3+ds.upstream/1.4.3+dsupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'microbench/CMakeLists.txt')
-rw-r--r--microbench/CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/microbench/CMakeLists.txt b/microbench/CMakeLists.txt
new file mode 100644
index 0000000..639915b
--- /dev/null
+++ b/microbench/CMakeLists.txt
@@ -0,0 +1,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,SOURCE_DIR>/include")
+target_link_libraries(benchmark_residual
+ FLAC
+ $<$<BOOL:${HAVE_CLOCK_GETTIME}>:rt>)