diff options
Diffstat (limited to 'examples/CMakeLists.txt')
-rw-r--r-- | examples/CMakeLists.txt | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/CMakeLists.txt b/examples/CMakeLists.txt index 1203592..7228860 100644 --- a/examples/CMakeLists.txt +++ b/examples/CMakeLists.txt | |||
@@ -3,6 +3,7 @@ | |||
3 | # license that can be found in the LICENSE file. | 3 | # license that can be found in the LICENSE file. |
4 | 4 | ||
5 | list(APPEND COMPAT_SOURCES | 5 | list(APPEND COMPAT_SOURCES |
6 | ../openbsd-compat/clock_gettime.c | ||
6 | ../openbsd-compat/getopt_long.c | 7 | ../openbsd-compat/getopt_long.c |
7 | ../openbsd-compat/strlcat.c | 8 | ../openbsd-compat/strlcat.c |
8 | ../openbsd-compat/strlcpy.c | 9 | ../openbsd-compat/strlcpy.c |
@@ -15,6 +16,13 @@ endif() | |||
15 | # drop -rdynamic | 16 | # drop -rdynamic |
16 | set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") | 17 | set(CMAKE_SHARED_LIBRARY_LINK_C_FLAGS "") |
17 | 18 | ||
19 | # enable -Wconversion -Wsign-conversion | ||
20 | if(NOT MSVC) | ||
21 | set_source_files_properties(assert.c cred.c info.c manifest.c reset.c | ||
22 | retries.c setpin.c util.c PROPERTIES COMPILE_FLAGS | ||
23 | "-Wconversion -Wsign-conversion") | ||
24 | endif() | ||
25 | |||
18 | # manifest | 26 | # manifest |
19 | add_executable(manifest manifest.c ${COMPAT_SOURCES}) | 27 | add_executable(manifest manifest.c ${COMPAT_SOURCES}) |
20 | target_link_libraries(manifest fido2) | 28 | target_link_libraries(manifest fido2) |
@@ -42,3 +50,11 @@ target_link_libraries(setpin fido2) | |||
42 | # retries | 50 | # retries |
43 | add_executable(retries retries.c ${COMPAT_SOURCES}) | 51 | add_executable(retries retries.c ${COMPAT_SOURCES}) |
44 | target_link_libraries(retries fido2) | 52 | target_link_libraries(retries fido2) |
53 | |||
54 | # select | ||
55 | add_executable(select select.c ${COMPAT_SOURCES}) | ||
56 | target_link_libraries(select fido2) | ||
57 | if(MINGW) | ||
58 | # needed for nanosleep() in mingw | ||
59 | target_link_libraries(select winpthread) | ||
60 | endif() | ||