Repository navigation
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
74 lines (65 loc) · 2.81 KB
/
Copy pathCMakeLists.txt
File metadata and controls
74 lines (65 loc) · 2.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
function(zfp_add_cpp_tests dims type bits)
# test compressed array class
set(test_name testArray${dims}${type})
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp zfpHashLib genSmoothRandNumsLib zfpChecksumsLib)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's references
set(test_name testArray${dims}${type}Refs)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp zfpHashLib rand${bits}Lib)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's pointers
set(test_name testArray${dims}${type}Ptrs)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's iterators
set(test_name testArray${dims}${type}Iters)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's views
set(test_name testArray${dims}${type}Views)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's view pointers
set(test_name testArray${dims}${type}ViewPtrs)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
# test class's view iterators
set(test_name testArray${dims}${type}ViewIters)
add_executable(${test_name} ${test_name}.cpp)
target_link_libraries(${test_name}
gtest gtest_main zfp)
target_compile_definitions(${test_name} PRIVATE ${zfp_compressed_array_defs})
add_test(NAME ${test_name} COMMAND ${test_name})
endfunction()
zfp_add_cpp_tests(1 f 32)
zfp_add_cpp_tests(2 f 32)
zfp_add_cpp_tests(3 f 32)
zfp_add_cpp_tests(4 f 32)
zfp_add_cpp_tests(1 d 64)
zfp_add_cpp_tests(2 d 64)
zfp_add_cpp_tests(3 d 64)
zfp_add_cpp_tests(4 d 64)
# test zfp::array::construct() invalid cases
set(test_name testConstruct)
add_executable(testConstruct testConstruct.cpp)
target_link_libraries(testConstruct gtest gtest_main zfp)
target_compile_definitions(testConstruct PRIVATE ${zfp_compressed_array_defs})
add_test(NAME testConstruct COMMAND testConstruct)