From 11ad1dace8458a4373f74f3e37d98f2b8e56e255 Mon Sep 17 00:00:00 2001 From: heckflosse Date: Mon, 25 Dec 2017 01:32:29 +0100 Subject: [PATCH] cmake switch -WITH_BENCHMARK enables BENCHFUN macro for rtengine --- CMakeLists.txt | 1 + rtengine/CMakeLists.txt | 3 +++ 2 files changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index d3e2f2c4b..fa153855b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -112,6 +112,7 @@ endif() option(USE_EXPERIMENTAL_LANG_VERSIONS "Build with -std=c++0x" OFF) option(BUILD_SHARED "Build with shared libraries" OFF) +option(WITH_BENCHMARK "Build with benchmark code" OFF) option(WITH_MYFILE_MMAP "Build using memory mapped file" ON) option(WITH_LTO "Build with link-time optimizations" OFF) option(WITH_SAN "Build with run-time sanitizer" OFF) diff --git a/rtengine/CMakeLists.txt b/rtengine/CMakeLists.txt index 3e5eb15e4..0ed91f23f 100644 --- a/rtengine/CMakeLists.txt +++ b/rtengine/CMakeLists.txt @@ -122,6 +122,9 @@ if(LENSFUN_HAS_LOAD_DIRECTORY) set_source_files_properties(rtlensfun.cc PROPERTIES COMPILE_DEFINITIONS RT_LENSFUN_HAS_LOAD_DIRECTORY) endif() +if(WITH_BENCHMARK) + add_definitions(-DBENCHMARK) +endif() if(NOT WITH_SYSTEM_KLT) set(RTENGINESOURCEFILES ${RTENGINESOURCEFILES}