Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Asteborg <maastebo@microsoft.com>2020-08-01 08:17:49 +0300
committerRalph Giles <giles@thaumas.net>2020-11-21 19:42:21 +0300
commit841d57b82a516ccc6e90d1d4aee8d4a7f0d00010 (patch)
treea74ba9f0ebbf5c948c71326dd82542d53d22fd23 /CMakeLists.txt
parent5bdb3a587db48fc2be7804b58d522bde562dd75d (diff)
cmake - add option for fixed point debug
Signed-off-by: Ralph Giles <giles@thaumas.net>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e30182ab..a28f441c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -85,6 +85,14 @@ if(APPLE)
add_feature_info(OPUS_BUILD_FRAMEWORK OPUS_BUILD_FRAMEWORK ${OPUS_BUILD_FRAMEWORK_HELP_STR})
endif()
+set(OPUS_FIXED_POINT_DEBUG_HELP_STR "debug fixed-point implementation.")
+cmake_dependent_option(OPUS_FIXED_POINT_DEBUG
+ ${OPUS_FIXED_POINT_DEBUG_HELP_STR}
+ ON
+ "OPUS_FIXED_POINT; OPUS_FIXED_POINT_DEBUG"
+ OFF)
+add_feature_info(OPUS_FIXED_POINT_DEBUG OPUS_FIXED_POINT_DEBUG ${OPUS_FIXED_POINT_DEBUG_HELP_STR})
+
set(OPUS_VAR_ARRAYS_HELP_STR "use variable length arrays for stack arrays.")
cmake_dependent_option(OPUS_VAR_ARRAYS
${OPUS_VAR_ARRAYS_HELP_STR}
@@ -272,6 +280,10 @@ target_include_directories(
target_link_libraries(opus PRIVATE ${OPUS_REQUIRED_LIBRARIES})
target_compile_definitions(opus PRIVATE OPUS_BUILD)
+if(OPUS_FIXED_POINT_DEBUG)
+ target_compile_definitions(opus PRIVATE FIXED_DEBUG)
+endif()
+
if(OPUS_FORTIFY_SOURCE AND NOT MSVC)
target_compile_definitions(opus PRIVATE
$<$<NOT:$<CONFIG:debug>>:_FORTIFY_SOURCE=2>)