diff options
author | Marcus Asteborg <maastebo@microsoft.com> | 2020-07-31 22:17:49 -0700 |
---|---|---|
committer | Ralph Giles <giles@thaumas.net> | 2020-11-21 08:42:21 -0800 |
commit | 841d57b82a516ccc6e90d1d4aee8d4a7f0d00010 (patch) | |
tree | a74ba9f0ebbf5c948c71326dd82542d53d22fd23 /CMakeLists.txt | |
parent | 5bdb3a587db48fc2be7804b58d522bde562dd75d (diff) | |
download | opus-841d57b82a516ccc6e90d1d4aee8d4a7f0d00010.tar.gz |
cmake - add option for fixed point debug
Signed-off-by: Ralph Giles <giles@thaumas.net>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
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>) |