aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2023-11-18 22:29:30 +0100
committerDaniil Cherednik <dan.cherednik@gmail.com>2023-11-18 23:39:54 +0100
commitff401eccf9f4d37193751633c2cf9beada2fd754 (patch)
tree25acd680fa565ecd60cee3dfba1a85c0221cf430 /test
parent9d1c670a6ad2eefda7180640c5bf0fcdb01b3e0f (diff)
downloadatracdenc-ff401eccf9f4d37193751633c2cf9beada2fd754.tar.gz
Get rid of gtest files. Use system package if available.
Diffstat (limited to 'test')
-rw-r--r--test/CMakeLists.txt29
1 files changed, 4 insertions, 25 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index 250f7d6..4b5c295 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -1,28 +1,7 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.1)
-macro(use_11)
- if (CMAKE_VERSION VERSION_LESS "3.1")
- message ("cmake version: " ${CMAKE_VERSION} " --std arguments will be forced")
-
- set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}" CACHE STRING "" FORCE)
- set (CMAKE_C_FLAGS "-std=c11 ${CMAKE_C_FLAGS}" CACHE STRING "" FORCE)
- else ()
- set (CMAKE_CXX_STANDARD 11)
- set (CMAKE_C_STANDARD 11)
- endif ()
-endmacro(use_11)
-
-use_11()
-
-if (CMAKE_SYSTEM_PROCESSOR MATCHES "(x86)|(X86)|(amd64)|(AMD64)")
- message ("Using -fsanitize=address")
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fsanitize=address -fno-omit-frame-pointer")
-else ()
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -fno-omit-frame-pointer")
-endif ()
-
-
-include_directories(${gtest_SOURCE_DIR}/include)
+set (CMAKE_CXX_STANDARD 11)
+set (CMAKE_C_STANDARD 11)
set(atracdenc_ut
../src/mdct/mdct_ut.cpp
@@ -37,9 +16,9 @@ add_executable(atracdenc_ut ${atracdenc_ut})
target_link_libraries(atracdenc_ut
bitstream
fft_impl
- gtest_main
atracdenc_impl
oma
+ GTest::gtest_main
)
enable_testing()