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-03-14 01:51:10 +0300
committerJean-Marc Valin <jmvalin@jmvalin.ca>2020-04-21 05:47:56 +0300
commitc401f21bf1ceab9d811cb6a510926f7609258fc4 (patch)
treecc0d4e3a23af4295999f8fd3d00ed92b3d370578 /CMakeLists.txt
parent927de8453c502586c03e25c169ec08f2a93ebc02 (diff)
cmake - Add option for testing to improve cli
Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
1 files changed, 7 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a8d72366..c027d8ec 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,6 +24,7 @@ option(OPUS_USE_ALLOCA "Use alloca for stack arrays (on non-C99 compilers)" OFF)
option(OPUS_CUSTOM_MODES "Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames"
OFF)
option(OPUS_BUILD_PROGRAMS "Build programs" OFF)
+option(OPUS_BUILD_TESTING "Build tests" OFF)
option(OPUS_FIXED_POINT
"Compile as fixed-point (for machines without a fast enough FPU)" OFF)
option(OPUS_ENABLE_FLOAT_API
@@ -45,6 +46,11 @@ if(OPUS_BUILD_SHARED_LIBRARY OR BUILD_SHARED_LIBS)
set(OPUS_BUILD_SHARED_LIBRARY ON)
endif()
+if(OPUS_BUILD_TESTING OR BUILD_TESTING)
+ set(OPUS_BUILD_TESTING ON)
+ set(BUILD_TESTING ON)
+endif()
+
if(OPUS_STACK_PROTECTOR)
if(NOT MSVC) # GC on by default on MSVC
check_and_set_flag(STACK_PROTECTION_STRONG -fstack-protector-strong)
@@ -131,6 +137,7 @@ add_feature_info(USE_ALLOCA OPUS_USE_ALLOCA
"Use alloca for stack arrays (on non-C99 compilers)")
add_feature_info(CUSTOM_MODES OPUS_CUSTOM_MODES
"Enable non-Opus modes, e.g. 44.1 kHz & 2^n frames")
+add_feature_info(BUILD_TESTING OPUS_BUILD_TESTING "Build test programs")
add_feature_info(BUILD_PROGRAMS OPUS_BUILD_PROGRAMS "Build programs")
add_feature_info(
FIXED_POINT OPUS_FIXED_POINT