minimap2 0.2.25.0 → 0.2.25.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -3
- data/ext/minimap2/Makefile +6 -2
- data/ext/minimap2/NEWS.md +38 -0
- data/ext/minimap2/README.md +9 -3
- data/ext/minimap2/align.c +5 -3
- data/ext/minimap2/cookbook.md +2 -2
- data/ext/minimap2/format.c +7 -4
- data/ext/minimap2/kalloc.c +20 -1
- data/ext/minimap2/kalloc.h +13 -2
- data/ext/minimap2/ksw2.h +1 -0
- data/ext/minimap2/ksw2_extd2_sse.c +1 -1
- data/ext/minimap2/ksw2_exts2_sse.c +79 -40
- data/ext/minimap2/ksw2_extz2_sse.c +1 -1
- data/ext/minimap2/lchain.c +15 -16
- data/ext/minimap2/lib/simde/CONTRIBUTING.md +114 -0
- data/ext/minimap2/lib/simde/COPYING +20 -0
- data/ext/minimap2/lib/simde/README.md +333 -0
- data/ext/minimap2/lib/simde/amalgamate.py +58 -0
- data/ext/minimap2/lib/simde/meson.build +33 -0
- data/ext/minimap2/lib/simde/netlify.toml +20 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/float32x2.h +140 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/float32x4.h +137 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/float64x1.h +142 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/float64x2.h +145 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int16x4.h +140 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int16x8.h +145 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int32x2.h +140 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int32x4.h +143 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int64x1.h +137 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int64x2.h +141 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int8x16.h +147 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/int8x8.h +141 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint16x4.h +134 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint16x8.h +138 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint32x2.h +134 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint32x4.h +137 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint64x1.h +131 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint64x2.h +135 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint8x16.h +141 -0
- data/ext/minimap2/lib/simde/simde/arm/neon/uint8x8.h +135 -0
- data/ext/minimap2/lib/simde/simde/arm/neon.h +97 -0
- data/ext/minimap2/lib/simde/simde/check.h +267 -0
- data/ext/minimap2/lib/simde/simde/debug-trap.h +83 -0
- data/ext/minimap2/lib/simde/simde/hedley.h +1899 -0
- data/ext/minimap2/lib/simde/simde/simde-arch.h +445 -0
- data/ext/minimap2/lib/simde/simde/simde-common.h +697 -0
- data/ext/minimap2/lib/simde/simde/x86/avx.h +5385 -0
- data/ext/minimap2/lib/simde/simde/x86/avx2.h +2402 -0
- data/ext/minimap2/lib/simde/simde/x86/avx512bw.h +391 -0
- data/ext/minimap2/lib/simde/simde/x86/avx512f.h +3389 -0
- data/ext/minimap2/lib/simde/simde/x86/avx512vl.h +112 -0
- data/ext/minimap2/lib/simde/simde/x86/fma.h +659 -0
- data/ext/minimap2/lib/simde/simde/x86/mmx.h +2210 -0
- data/ext/minimap2/lib/simde/simde/x86/sse.h +3696 -0
- data/ext/minimap2/lib/simde/simde/x86/sse2.h +5991 -0
- data/ext/minimap2/lib/simde/simde/x86/sse3.h +343 -0
- data/ext/minimap2/lib/simde/simde/x86/sse4.1.h +1783 -0
- data/ext/minimap2/lib/simde/simde/x86/sse4.2.h +105 -0
- data/ext/minimap2/lib/simde/simde/x86/ssse3.h +1053 -0
- data/ext/minimap2/lib/simde/simde/x86/svml.h +543 -0
- data/ext/minimap2/lib/simde/test/CMakeLists.txt +166 -0
- data/ext/minimap2/lib/simde/test/arm/meson.build +4 -0
- data/ext/minimap2/lib/simde/test/arm/neon/meson.build +23 -0
- data/ext/minimap2/lib/simde/test/arm/neon/skel.c +871 -0
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon-internal.h +134 -0
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon.c +39 -0
- data/ext/minimap2/lib/simde/test/arm/neon/test-neon.h +10 -0
- data/ext/minimap2/lib/simde/test/arm/neon/vadd.c +1260 -0
- data/ext/minimap2/lib/simde/test/arm/neon/vdup_n.c +873 -0
- data/ext/minimap2/lib/simde/test/arm/neon/vmul.c +1084 -0
- data/ext/minimap2/lib/simde/test/arm/neon/vsub.c +1260 -0
- data/ext/minimap2/lib/simde/test/arm/test-arm-internal.h +18 -0
- data/ext/minimap2/lib/simde/test/arm/test-arm.c +20 -0
- data/ext/minimap2/lib/simde/test/arm/test-arm.h +8 -0
- data/ext/minimap2/lib/simde/test/cmake/AddCompilerFlags.cmake +171 -0
- data/ext/minimap2/lib/simde/test/cmake/ExtraWarningFlags.cmake +68 -0
- data/ext/minimap2/lib/simde/test/meson.build +64 -0
- data/ext/minimap2/lib/simde/test/munit/COPYING +21 -0
- data/ext/minimap2/lib/simde/test/munit/Makefile +55 -0
- data/ext/minimap2/lib/simde/test/munit/README.md +54 -0
- data/ext/minimap2/lib/simde/test/munit/example.c +351 -0
- data/ext/minimap2/lib/simde/test/munit/meson.build +37 -0
- data/ext/minimap2/lib/simde/test/munit/munit.c +2055 -0
- data/ext/minimap2/lib/simde/test/munit/munit.h +535 -0
- data/ext/minimap2/lib/simde/test/run-tests.c +20 -0
- data/ext/minimap2/lib/simde/test/run-tests.h +260 -0
- data/ext/minimap2/lib/simde/test/x86/avx.c +13752 -0
- data/ext/minimap2/lib/simde/test/x86/avx2.c +9977 -0
- data/ext/minimap2/lib/simde/test/x86/avx512bw.c +2664 -0
- data/ext/minimap2/lib/simde/test/x86/avx512f.c +10416 -0
- data/ext/minimap2/lib/simde/test/x86/avx512vl.c +210 -0
- data/ext/minimap2/lib/simde/test/x86/fma.c +2557 -0
- data/ext/minimap2/lib/simde/test/x86/meson.build +33 -0
- data/ext/minimap2/lib/simde/test/x86/mmx.c +2878 -0
- data/ext/minimap2/lib/simde/test/x86/skel.c +2984 -0
- data/ext/minimap2/lib/simde/test/x86/sse.c +5121 -0
- data/ext/minimap2/lib/simde/test/x86/sse2.c +9860 -0
- data/ext/minimap2/lib/simde/test/x86/sse3.c +486 -0
- data/ext/minimap2/lib/simde/test/x86/sse4.1.c +3446 -0
- data/ext/minimap2/lib/simde/test/x86/sse4.2.c +101 -0
- data/ext/minimap2/lib/simde/test/x86/ssse3.c +2084 -0
- data/ext/minimap2/lib/simde/test/x86/svml.c +1545 -0
- data/ext/minimap2/lib/simde/test/x86/test-avx.h +16 -0
- data/ext/minimap2/lib/simde/test/x86/test-avx512.h +25 -0
- data/ext/minimap2/lib/simde/test/x86/test-mmx.h +13 -0
- data/ext/minimap2/lib/simde/test/x86/test-sse.h +13 -0
- data/ext/minimap2/lib/simde/test/x86/test-sse2.h +13 -0
- data/ext/minimap2/lib/simde/test/x86/test-x86-internal.h +196 -0
- data/ext/minimap2/lib/simde/test/x86/test-x86.c +48 -0
- data/ext/minimap2/lib/simde/test/x86/test-x86.h +8 -0
- data/ext/minimap2/main.c +13 -6
- data/ext/minimap2/map.c +0 -5
- data/ext/minimap2/minimap.h +40 -31
- data/ext/minimap2/minimap2.1 +19 -5
- data/ext/minimap2/misc/paftools.js +545 -24
- data/ext/minimap2/options.c +1 -1
- data/ext/minimap2/pyproject.toml +2 -0
- data/ext/minimap2/python/mappy.pyx +3 -1
- data/ext/minimap2/seed.c +1 -1
- data/ext/minimap2/setup.py +32 -22
- data/lib/minimap2/version.rb +1 -1
- metadata +100 -3
@@ -0,0 +1,18 @@
|
|
1
|
+
#if !defined(SIMDE_TESTS_ARM_INTERNAL_H)
|
2
|
+
#define SIMDE_TESTS_CURRENT_ARCH arm
|
3
|
+
|
4
|
+
#include "../run-tests.h"
|
5
|
+
|
6
|
+
HEDLEY_BEGIN_C_DECLS
|
7
|
+
|
8
|
+
#define SIMDE_TESTS_ARM_GENERATE_SUITE_GETTERS(isax) \
|
9
|
+
MunitSuite* SIMDE_TESTS_GENERATE_SYMBOL_FULL(suite, SIMDE_TESTS_CURRENT_ARCH, isax, native, c)(void); \
|
10
|
+
MunitSuite* SIMDE_TESTS_GENERATE_SYMBOL_FULL(suite, SIMDE_TESTS_CURRENT_ARCH, isax, native, cpp)(void); \
|
11
|
+
MunitSuite* SIMDE_TESTS_GENERATE_SYMBOL_FULL(suite, SIMDE_TESTS_CURRENT_ARCH, isax, emul, c)(void); \
|
12
|
+
MunitSuite* SIMDE_TESTS_GENERATE_SYMBOL_FULL(suite, SIMDE_TESTS_CURRENT_ARCH, isax, emul, cpp)(void)
|
13
|
+
|
14
|
+
SIMDE_TESTS_ARM_GENERATE_SUITE_GETTERS(neon);
|
15
|
+
|
16
|
+
HEDLEY_END_C_DECLS
|
17
|
+
|
18
|
+
#endif /* !defined(SIMDE_TESTS_ARM_INTERNAL_H) */
|
@@ -0,0 +1,20 @@
|
|
1
|
+
#include "test-arm.h"
|
2
|
+
#include "test-arm-internal.h"
|
3
|
+
#include "neon/test-neon.h"
|
4
|
+
|
5
|
+
#include <stdio.h>
|
6
|
+
|
7
|
+
MunitSuite*
|
8
|
+
simde_tests_arm_get_suite(void) {
|
9
|
+
static MunitSuite children[] = {
|
10
|
+
{ NULL, NULL, NULL, 1, MUNIT_SUITE_OPTION_NONE },
|
11
|
+
{ NULL, NULL, NULL, 1, MUNIT_SUITE_OPTION_NONE }
|
12
|
+
};
|
13
|
+
static MunitSuite suite = { HEDLEY_STATIC_CAST(char*, "/arm"), NULL, NULL, 1, MUNIT_SUITE_OPTION_NONE };
|
14
|
+
|
15
|
+
children[0] = *simde_tests_arm_neon_get_suite();
|
16
|
+
|
17
|
+
suite.suites = children;
|
18
|
+
|
19
|
+
return &suite;
|
20
|
+
}
|
@@ -0,0 +1,171 @@
|
|
1
|
+
# This module provides a convenient way to add C/C++ compiler flags if
|
2
|
+
# the compiler supports them.
|
3
|
+
|
4
|
+
include (CheckCCompilerFlag)
|
5
|
+
include (CheckCXXCompilerFlag)
|
6
|
+
|
7
|
+
cmake_policy(SET CMP0054 NEW)
|
8
|
+
|
9
|
+
# Depending on the settings, some compilers will accept unknown flags.
|
10
|
+
# We try to disable this behavior by also passing these flags when we
|
11
|
+
# check if a flag is supported.
|
12
|
+
set (ADD_COMPILER_FLAGS_PREPEND "")
|
13
|
+
|
14
|
+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
15
|
+
set (ADD_COMPILER_FLAGS_PREPEND "-Wall -Wextra -Werror")
|
16
|
+
elseif (CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
17
|
+
set (ADD_COMPILER_FLAGS_PREPEND "-Werror=unknown-warning-option")
|
18
|
+
endif ()
|
19
|
+
|
20
|
+
##
|
21
|
+
# Set a variable to different flags, depending on which compiler is in
|
22
|
+
# use.
|
23
|
+
#
|
24
|
+
# Example:
|
25
|
+
# set_compiler_specific_flags(VARIABLE varname MSVC /wd666 INTEL /wd1729)
|
26
|
+
#
|
27
|
+
# This will set varname to /wd666 if the compiler is MSVC, and /wd1729
|
28
|
+
# if it is Intel.
|
29
|
+
#
|
30
|
+
# Possible compilers:
|
31
|
+
# - GCC: GNU C Compiler
|
32
|
+
# - GCCISH: A compiler that (tries to) be GCC-compatible on the CLI
|
33
|
+
# (i.e., anything but MSVC).
|
34
|
+
# - CLANG: clang
|
35
|
+
# - MSVC: Microsoft Visual C++ compiler
|
36
|
+
# - INTEL: Intel C Compiler
|
37
|
+
# - PGI: PGI C Compiler
|
38
|
+
#
|
39
|
+
# Note: the compiler is determined based on the value of the
|
40
|
+
# CMAKE_C_COMPILER_ID variable, not CMAKE_CXX_COMPILER_ID.
|
41
|
+
##
|
42
|
+
function (set_compiler_specific_flags)
|
43
|
+
set (oneValueArgs VARIABLE)
|
44
|
+
set (multiValueArgs GCC GCCISH INTEL CLANG MSVC PGI)
|
45
|
+
cmake_parse_arguments(COMPILER_SPECIFIC_FLAGS "${options}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
46
|
+
unset (options)
|
47
|
+
unset (oneValueArgs)
|
48
|
+
unset (multiValueArgs)
|
49
|
+
|
50
|
+
set (compiler_flags)
|
51
|
+
|
52
|
+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
53
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_GCC})
|
54
|
+
elseif(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
55
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_CLANG})
|
56
|
+
elseif(CMAKE_C_COMPILER_ID STREQUAL "Intel")
|
57
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_INTEL})
|
58
|
+
elseif(CMAKE_C_COMPILER_ID STREQUAL "MSVC")
|
59
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_MSVC})
|
60
|
+
elseif(CMAKE_C_COMPILER_ID STREQUAL "PGI")
|
61
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_PGI})
|
62
|
+
endif()
|
63
|
+
|
64
|
+
set(GCCISH_COMPILERS GNU Clang Intel)
|
65
|
+
list(FIND GCCISH_COMPILERS "${CMAKE_C_COMPILER_ID}" IS_GCCISH)
|
66
|
+
if (IS_GCCISH GREATER -1)
|
67
|
+
list (APPEND compiler_flags ${COMPILER_SPECIFIC_FLAGS_GCCISH})
|
68
|
+
endif ()
|
69
|
+
|
70
|
+
set (${COMPILER_SPECIFIC_FLAGS_VARIABLE} "${compiler_flags}" PARENT_SCOPE)
|
71
|
+
endfunction ()
|
72
|
+
|
73
|
+
function (source_file_add_compiler_flags_unchecked file)
|
74
|
+
set (flags ${ARGV})
|
75
|
+
list (REMOVE_AT flags 0)
|
76
|
+
get_source_file_property (sources ${file} SOURCES)
|
77
|
+
|
78
|
+
foreach (flag ${flags})
|
79
|
+
get_source_file_property (existing ${file} COMPILE_FLAGS)
|
80
|
+
if ("${existing}" STREQUAL "NOTFOUND")
|
81
|
+
set_source_files_properties (${file}
|
82
|
+
PROPERTIES COMPILE_FLAGS "${flag}")
|
83
|
+
else ()
|
84
|
+
set_source_files_properties (${file}
|
85
|
+
PROPERTIES COMPILE_FLAGS "${existing} ${flag}")
|
86
|
+
endif ()
|
87
|
+
endforeach (flag)
|
88
|
+
endfunction ()
|
89
|
+
|
90
|
+
function (source_file_add_compiler_flags file)
|
91
|
+
set (flags ${ARGV})
|
92
|
+
list (REMOVE_AT flags 0)
|
93
|
+
get_source_file_property (sources ${file} SOURCES)
|
94
|
+
|
95
|
+
foreach (flag ${flags})
|
96
|
+
if (CMAKE_C_COMPILER_ID STREQUAL "GNU")
|
97
|
+
# Because https://gcc.gnu.org/wiki/FAQ#wnowarning
|
98
|
+
string (REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
|
99
|
+
else ()
|
100
|
+
set (flag_to_test ${flag})
|
101
|
+
endif ()
|
102
|
+
|
103
|
+
if (file MATCHES "\\.c$")
|
104
|
+
string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CFLAG_${flag_to_test}")
|
105
|
+
CHECK_C_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
|
106
|
+
elseif (file MATCHES "\\.(cpp|cc|cxx)$")
|
107
|
+
string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" test_name "CXXFLAG_${flag_to_test}")
|
108
|
+
CHECK_CXX_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${test_name})
|
109
|
+
endif ()
|
110
|
+
|
111
|
+
if (${test_name})
|
112
|
+
source_file_add_compiler_flags_unchecked (${file} ${flag})
|
113
|
+
endif ()
|
114
|
+
|
115
|
+
unset (test_name)
|
116
|
+
unset (flag_to_test)
|
117
|
+
endforeach (flag)
|
118
|
+
|
119
|
+
unset (flags)
|
120
|
+
endfunction ()
|
121
|
+
|
122
|
+
function (target_add_compiler_flags target)
|
123
|
+
set (flags ${ARGV})
|
124
|
+
list (REMOVE_AT flags 0)
|
125
|
+
get_target_property (sources ${target} SOURCES)
|
126
|
+
|
127
|
+
foreach (source ${sources})
|
128
|
+
source_file_add_compiler_flags (${source} ${flags})
|
129
|
+
endforeach (source)
|
130
|
+
|
131
|
+
unset (flags)
|
132
|
+
unset (sources)
|
133
|
+
endfunction (target_add_compiler_flags)
|
134
|
+
|
135
|
+
# global_add_compiler_flags (flag1 [flag2 [flag3 ...]]):
|
136
|
+
#
|
137
|
+
# This just adds the requested compiler flags to
|
138
|
+
# CMAKE_C/CXX_FLAGS variable if they work with the compiler.
|
139
|
+
function (global_add_compiler_flags)
|
140
|
+
set (flags ${ARGV})
|
141
|
+
|
142
|
+
foreach (flag ${flags})
|
143
|
+
if ("GNU" STREQUAL "${CMAKE_C_COMPILER_ID}")
|
144
|
+
# Because https://gcc.gnu.org/wiki/FAQ#wnowarning
|
145
|
+
string (REGEX REPLACE "\\-Wno\\-(.+)" "-W\\1" flag_to_test "${flag}")
|
146
|
+
else ()
|
147
|
+
set (flag_to_test "${flag}")
|
148
|
+
endif ()
|
149
|
+
|
150
|
+
string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" c_test_name "CFLAG_${flag_to_test}")
|
151
|
+
CHECK_C_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${c_test_name})
|
152
|
+
if (${c_test_name})
|
153
|
+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${flag}")
|
154
|
+
endif ()
|
155
|
+
unset (c_test_name)
|
156
|
+
|
157
|
+
string (REGEX REPLACE "[^a-zA-Z0-9]+" "_" cxx_test_name "CFLAG_${flag_to_test}")
|
158
|
+
CHECK_CXX_COMPILER_FLAG ("${ADD_COMPILER_FLAGS_PREPEND} ${flag_to_test}" ${cxx_test_name})
|
159
|
+
if (${cxx_test_name})
|
160
|
+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${flag}")
|
161
|
+
endif ()
|
162
|
+
unset (cxx_test_name)
|
163
|
+
|
164
|
+
unset (flag_to_test)
|
165
|
+
endforeach (flag)
|
166
|
+
|
167
|
+
unset (flags)
|
168
|
+
|
169
|
+
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS}" PARENT_SCOPE)
|
170
|
+
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}" PARENT_SCOPE)
|
171
|
+
endfunction (global_add_compiler_flags)
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# This is basically supposed to be the CMake equivalent of
|
2
|
+
# https://git.gnome.org/browse/gnome-common/tree/macros2/gnome-compiler-flags.m4
|
3
|
+
|
4
|
+
include (AddCompilerFlags)
|
5
|
+
|
6
|
+
if (MSVC)
|
7
|
+
set (EXTRA_WARNING_FLAGS
|
8
|
+
/W4
|
9
|
+
/analyze)
|
10
|
+
else ()
|
11
|
+
set (EXTRA_WARNING_FLAGS
|
12
|
+
-Wall
|
13
|
+
-Wcast-align
|
14
|
+
-Wclobbered
|
15
|
+
-Wempty-body
|
16
|
+
-Werror=format=2
|
17
|
+
-Werror=format-security
|
18
|
+
-Werror=implicit-function-declaration
|
19
|
+
-Werror=init-self
|
20
|
+
-Werror=missing-include-dirs
|
21
|
+
-Werror=missing-prototypes
|
22
|
+
-Werror=pointer-arith
|
23
|
+
-Wextra
|
24
|
+
-Wformat-nonliteral
|
25
|
+
-Wformat-security
|
26
|
+
-Wignored-qualifiers
|
27
|
+
-Winit-self
|
28
|
+
-Winvalid-pch
|
29
|
+
-Wlogical-op
|
30
|
+
-Wmissing-declarations
|
31
|
+
-Wmissing-format-attribute
|
32
|
+
-Wmissing-include-dirs
|
33
|
+
-Wmissing-noreturn
|
34
|
+
-Wmissing-parameter-type
|
35
|
+
-Wmissing-prototypes
|
36
|
+
-Wnested-externs
|
37
|
+
-Wno-missing-field-initializers
|
38
|
+
-Wno-strict-aliasing
|
39
|
+
-Wno-uninitialized
|
40
|
+
-Wno-unused-parameter
|
41
|
+
-Wold-style-definition
|
42
|
+
-Woverride-init
|
43
|
+
-Wpacked
|
44
|
+
-Wpointer-arith
|
45
|
+
-Wredundant-decls
|
46
|
+
-Wreturn-type
|
47
|
+
-Wshadow
|
48
|
+
-Wsign-compare
|
49
|
+
-Wstrict-prototypes
|
50
|
+
-Wswitch-enum
|
51
|
+
-Wsync-nand
|
52
|
+
-Wtype-limits
|
53
|
+
-Wundef
|
54
|
+
-Wuninitialized
|
55
|
+
-WUnsafe-loop-optimizations
|
56
|
+
-Wwrite-strings
|
57
|
+
-Wsuggest-attribute=format)
|
58
|
+
endif ()
|
59
|
+
|
60
|
+
mark_as_advanced (EXTRA_WARNING_FLAGS)
|
61
|
+
|
62
|
+
function (target_add_extra_warning_flags target)
|
63
|
+
target_add_compiler_flags (${target} ${EXTRA_WARNING_FLAGS})
|
64
|
+
endfunction (target_add_extra_warning_flags)
|
65
|
+
|
66
|
+
function (source_file_add_extra_warning_flags file)
|
67
|
+
source_file_add_compiler_flags (${file} ${EXTRA_WARNING_FLAGS})
|
68
|
+
endfunction (source_file_add_extra_warning_flags)
|
@@ -0,0 +1,64 @@
|
|
1
|
+
munit_deps = []
|
2
|
+
munit_defs = []
|
3
|
+
if cc.get_id() == 'pgi'
|
4
|
+
munit_deps += dependency('openmp')
|
5
|
+
endif
|
6
|
+
if cc.has_function('clock_gettime')
|
7
|
+
librt_dep = cc.find_library('rt', required: false)
|
8
|
+
if not librt_dep.found()
|
9
|
+
munit_defs += '-DPSNIP_CLOCK_NO_LIBRT'
|
10
|
+
endif
|
11
|
+
munit_deps += librt_dep
|
12
|
+
endif
|
13
|
+
munit = static_library('munit', 'munit/munit.c', dependencies: munit_deps)
|
14
|
+
|
15
|
+
simde_c_defs = []
|
16
|
+
simde_cxx_defs = []
|
17
|
+
simde_c_args = []
|
18
|
+
simde_cxx_args = []
|
19
|
+
simde_deps = []
|
20
|
+
|
21
|
+
c_openmp_simd = false
|
22
|
+
cxx_openmp_simd = false
|
23
|
+
foreach omp_arg : ['-fopenmp-simd', '-qopenmp-simd']
|
24
|
+
if (not c_openmp_simd) and cc.has_argument(omp_arg)
|
25
|
+
simde_c_args += omp_arg
|
26
|
+
simde_c_defs += '-DSIMDE_ENABLE_OPENMP'
|
27
|
+
c_openmp_simd = true
|
28
|
+
endif
|
29
|
+
|
30
|
+
if (not cxx_openmp_simd) and cxx.has_argument(omp_arg)
|
31
|
+
simde_cxx_args += omp_arg
|
32
|
+
simde_cxx_defs += '-DSIMDE_ENABLE_OPENMP'
|
33
|
+
cxx_openmp_simd = true
|
34
|
+
endif
|
35
|
+
endforeach
|
36
|
+
|
37
|
+
simde_native_c_flags = []
|
38
|
+
# if cc.has_argument('-march=native+simd')
|
39
|
+
# simde_native_c_flags += '-march=native+simd'
|
40
|
+
# elif cc.has_argument('-march=native')
|
41
|
+
# simde_native_c_flags += '-march=native'
|
42
|
+
# endif
|
43
|
+
|
44
|
+
simde_native_cxx_flags = []
|
45
|
+
# if cxx.has_argument('-march=native+simd')
|
46
|
+
# simde_native_cxx_flags += '-march=native+simd'
|
47
|
+
# elif cxx.has_argument('-march=native')
|
48
|
+
# simde_native_cxx_flags += '-march=native'
|
49
|
+
# endif
|
50
|
+
|
51
|
+
if not c_openmp_simd
|
52
|
+
simde_deps += dependency('openmp', required: false)
|
53
|
+
endif
|
54
|
+
|
55
|
+
simde_include_dir = include_directories('..')
|
56
|
+
|
57
|
+
subdir('x86')
|
58
|
+
subdir('arm')
|
59
|
+
|
60
|
+
executable('run-tests', 'run-tests.c',
|
61
|
+
link_with: [munit, simde_tests_x86, simde_tests_arm],
|
62
|
+
dependencies: simde_deps,
|
63
|
+
c_args: simde_c_args + simde_c_defs + simde_native_c_flags,
|
64
|
+
cpp_args: simde_cxx_args + simde_cxx_defs + simde_native_cxx_flags)
|
@@ -0,0 +1,21 @@
|
|
1
|
+
µnit Testing Framework
|
2
|
+
Copyright (c) 2013-2016 Evan Nemerson <evan@nemerson.com>
|
3
|
+
|
4
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
5
|
+
a copy of this software and associated documentation files (the
|
6
|
+
"Software"), to deal in the Software without restriction, including
|
7
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
8
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
9
|
+
permit persons to whom the Software is furnished to do so, subject to
|
10
|
+
the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be
|
13
|
+
included in all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
17
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
19
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
20
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
21
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,55 @@
|
|
1
|
+
# Using µnit is very simple; just include the header and add the C
|
2
|
+
# file to your sources. That said, here is a simple Makefile to build
|
3
|
+
# the example.
|
4
|
+
|
5
|
+
CSTD:=99
|
6
|
+
OPENMP:=n
|
7
|
+
ASAN:=n
|
8
|
+
UBSAN:=n
|
9
|
+
EXTENSION:=
|
10
|
+
TEST_ENV:=
|
11
|
+
CFLAGS:=
|
12
|
+
AGGRESSIVE_WARNINGS=n
|
13
|
+
|
14
|
+
ifeq ($(CC),pgcc)
|
15
|
+
CFLAGS+=-c$(CSTD)
|
16
|
+
else
|
17
|
+
CFLAGS+=-std=c$(CSTD)
|
18
|
+
endif
|
19
|
+
|
20
|
+
ifeq ($(OPENMP),y)
|
21
|
+
ifeq ($(CC),pgcc)
|
22
|
+
CFLAGS+=-mp
|
23
|
+
else
|
24
|
+
CFLAGS+=-fopenmp
|
25
|
+
endif
|
26
|
+
endif
|
27
|
+
|
28
|
+
ifneq ($(SANITIZER),)
|
29
|
+
CFLAGS+=-fsanitize=$(SANITIZER)
|
30
|
+
endif
|
31
|
+
|
32
|
+
ifneq ($(CC),pgcc)
|
33
|
+
ifeq ($(EXTRA_WARNINGS),y)
|
34
|
+
CFLAGS+=-Wall -Wextra -Werror
|
35
|
+
endif
|
36
|
+
|
37
|
+
ifeq ($(ASAN),y)
|
38
|
+
CFLAGS+=-fsanitize=address
|
39
|
+
endif
|
40
|
+
|
41
|
+
ifeq ($(UBSAN),y)
|
42
|
+
CFLAGS+=-fsanitize=undefined
|
43
|
+
endif
|
44
|
+
endif
|
45
|
+
|
46
|
+
example$(EXTENSION): munit.h munit.c example.c
|
47
|
+
$(CC) $(CFLAGS) -o $@ munit.c example.c
|
48
|
+
|
49
|
+
test:
|
50
|
+
$(TEST_ENV) ./example$(EXTENSION)
|
51
|
+
|
52
|
+
clean:
|
53
|
+
rm -f example$(EXTENSION)
|
54
|
+
|
55
|
+
all: example$(EXTENSION)
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# µnit
|
2
|
+
|
3
|
+
µnit is a small but full-featured unit testing framework for C. It has
|
4
|
+
no dependencies (beyond libc), is permissively licensed (MIT), and is
|
5
|
+
easy to include into any project.
|
6
|
+
|
7
|
+
For more information, see
|
8
|
+
[the µnit web site](https://nemequ.github.io/munit).
|
9
|
+
|
10
|
+
[![Build status](https://travis-ci.org/nemequ/munit.svg?branch=master)](https://travis-ci.org/nemequ/munit)
|
11
|
+
[![Windows build status](https://ci.appveyor.com/api/projects/status/db515g5ifcwjohq7/branch/master?svg=true)](https://ci.appveyor.com/project/quixdb/munit/branch/master)
|
12
|
+
|
13
|
+
## Features
|
14
|
+
|
15
|
+
Features µnit currently includes include:
|
16
|
+
|
17
|
+
* Handy assertion macros which make for nice error messages.
|
18
|
+
* Reproducible cross-platform random number generation, including
|
19
|
+
support for supplying a seed via CLI.
|
20
|
+
* Timing of both wall-clock and CPU time.
|
21
|
+
* Parameterized tests.
|
22
|
+
* Nested test suites.
|
23
|
+
* Flexible CLI.
|
24
|
+
* Forking
|
25
|
+
([except on Windows](https://github.com/nemequ/munit/issues/2)).
|
26
|
+
* Hiding output of successful tests.
|
27
|
+
|
28
|
+
Features µnit does not currently include, but some day may include
|
29
|
+
(a.k.a., if you file a PR…), include:
|
30
|
+
|
31
|
+
* [TAP](http://testanything.org/) support; feel free to discuss in
|
32
|
+
[issue #1](https://github.com/nemequ/munit/issues/1)
|
33
|
+
|
34
|
+
### Include into your project with meson
|
35
|
+
|
36
|
+
In your `subprojects` folder put a `munit.wrap` file containing:
|
37
|
+
|
38
|
+
```
|
39
|
+
[wrap-git]
|
40
|
+
directory=munit
|
41
|
+
url=https://github.com/nemequ/munit/
|
42
|
+
revision=head
|
43
|
+
```
|
44
|
+
|
45
|
+
Then you can use a subproject fallback when you include munit as a
|
46
|
+
dependency to your project: `dependency('munit', fallback: ['munit', 'munit_dep'])`
|
47
|
+
|
48
|
+
## Documentation
|
49
|
+
|
50
|
+
See [the µnit web site](https://nemequ.github.io/munit).
|
51
|
+
|
52
|
+
Additionally, there is a heavily-commented
|
53
|
+
[example.c](https://github.com/nemequ/munit/blob/master/example.c) in
|
54
|
+
the repository.
|