@@ -31,7 +31,7 @@ endif()
31
31
32
32
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wno-unused-parameter -Wno-missing-prototypes -Wno-missing-declarations -Wno-implicit-function-declaration -Wno-bad-function-cast" )
33
33
34
- add_library (mocks STATIC
34
+ add_library (mocks STATIC EXCLUDE_FROM_ALL
35
35
framework /src/mock_gestures.c
36
36
framework /src/mock_screen_stack.c
37
37
framework /src/mock_memory.c
89
89
add_executable (${EXE} test_${TEST_NAME} .c)
90
90
# asan must be first library in linking order
91
91
target_link_libraries (${EXE} PRIVATE
92
- $<$<BOOL :${SANITIZE_ADDRESS} >:asan >
92
+ $<$<BOOL :${SANITIZE_ADDRESS} >:-fsanitize=address >
93
93
$<$<BOOL :${SANITIZE_UNDEFINED} >:-fsanitize=undefined>
94
94
-Wl,--start -group
95
95
c-unit-tests_rust_c
@@ -114,11 +114,13 @@ add_library(u2f-util
114
114
u2f/u2f_util_t.c
115
115
)
116
116
target_include_directories (u2f-util
117
- PUBLIC
118
- ${CMAKE_CURRENT_SOURCE_DIR}
119
117
SYSTEM PUBLIC
120
118
${HIDAPI_INCLUDE_DIRS}
121
119
)
120
+ target_include_directories (u2f-util
121
+ PUBLIC
122
+ ${CMAKE_CURRENT_SOURCE_DIR}
123
+ )
122
124
123
125
# NOTE: we only depend on include directories and definitions from c-unit-tests_rust_c
124
126
target_link_libraries (u2f-util PUBLIC ${HIDAPI_LDFLAGS} c-unit-tests_rust_c)
@@ -136,7 +138,7 @@ foreach(TEST_NAME ${U2F_TESTS})
136
138
# This tests link to our code
137
139
add_executable (${EXE} test_${TEST_NAME} .c framework /src/mock_hidapi.c)
138
140
target_link_libraries (${EXE} PRIVATE
139
- $<$<BOOL :${SANITIZE_ADDRESS} >:asan >
141
+ $<$<BOOL :${SANITIZE_ADDRESS} >:-fsanitize=address >
140
142
$<$<BOOL :${SANITIZE_UNDEFINED} >:-fsanitize=undefined>
141
143
$<$<NOT :$<PLATFORM_ID:Darwin>>:-Wl,--start -group>
142
144
c-unit-tests_rust_c
@@ -152,7 +154,7 @@ foreach(TEST_NAME ${U2F_TESTS})
152
154
add_executable (${EXE} test_${TEST_NAME} .c)
153
155
# asan must be first library in linking order
154
156
target_link_libraries (${EXE} PRIVATE
155
- $<$<BOOL :${SANITIZE_ADDRESS} >:asan >
157
+ $<$<BOOL :${SANITIZE_ADDRESS} >:-fsanitize=address >
156
158
$<$<BOOL :${SANITIZE_UNDEFINED} >:-fsanitize=undefined>
157
159
u2f-util
158
160
)
0 commit comments