Files
Aaru.Compression.Native/tests/CMakeLists.txt

28 lines
974 B
CMake
Raw Normal View History

2021-10-14 04:01:16 +01:00
if("${CMAKE_C_PLATFORM_ID}" MATCHES "MinGW" OR "${AARU_BUILD_PACKAGE}" MATCHES 1)
return()
endif()
# 'Google_test' is the subproject name
project(tests)
# 'lib' is the folder with Google Test sources
add_subdirectory(lib)
include_directories(${gtest_SOURCE_DIR}/include ${gtest_SOURCE_DIR})
2021-10-14 04:37:48 +01:00
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/apple_rle.bin
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/data/)
2021-10-17 04:45:11 +01:00
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/adc.bin
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/data/)
2021-10-18 00:17:15 +01:00
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/bzip2.bz2
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/data/)
2021-10-18 02:44:57 +01:00
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data/lzip.lz
DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/data/)
2021-10-14 04:01:16 +01:00
# 'Google_Tests_run' is the target name
# 'test1.cpp tests2.cpp' are source files with tests
2021-10-18 02:44:57 +01:00
add_executable(tests_run apple_rle.cpp crc32.c crc32.h adc.cpp bzip2.cpp lzip.cpp)
2021-10-14 04:01:16 +01:00
target_link_libraries(tests_run gtest gtest_main "Aaru.Compression.Native")