-
-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
54 changed files
with
1,576 additions
and
664 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
root = true | ||
|
||
[!*.{h,cpp}] | ||
indent_style = space | ||
indent_size = 2 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.{h,cpp}] | ||
indent_style = tab | ||
trim_trailing_whitespace = true | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,33 @@ | ||
cmake_minimum_required(VERSION 3.10) | ||
project(snowboy) | ||
cmake_minimum_required(VERSION 3.12) | ||
project(snowman VERSION 1.0.0 DESCRIPTION "Snowman hotword detection library") | ||
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR}/cmake) | ||
|
||
#option(SNOWBOY_CXX11_COMPAT "Build library with C++11 strings disable to be binary compatible with the original release." OFF) | ||
set(SNOWBOY_CXX11_COMPAT ON) | ||
option(SNOWMAN_CXX11_COMPAT "Build library with C++11 strings disabled to be binary compatible with the original release." ON) | ||
option(SNOWMAN_BUILD_APPS "Build helper applications like enroll or cut" ON) | ||
option(SNOWMAN_BUILD_TESTS "Build unit tests (requires gtest and openssl)" ON) | ||
option(SNOWMAN_BUILD_SHARED "Build library as a shared library instead of a static library" OFF) | ||
# According to steam ~99.17% of users have at least ssse3 | ||
# and 100% have SSE, SSE2 and SSE3, so this is on by default | ||
option(SNOWMAN_BUILD_WITH_SSE3 "Enable sse3 optimizations" ON) | ||
# ~98.3%, so this is on by default as well | ||
option(SNOWMAN_BUILD_WITH_SSE4 "Enable sse4 optimizations" ON) | ||
# ~94.7% | ||
option(SNOWMAN_BUILD_WITH_AVX "Enable avx optimizations" OFF) | ||
# ~82% | ||
option(SNOWMAN_BUILD_WITH_AVX2 "Enable avx2 optimizations" OFF) | ||
option(SNOWMAN_BUILD_NATIVE "Build library for the current cpu. This makes sure it uses every instruction set available, but the resulting binary probably won't run on older hardware." OFF) | ||
|
||
if(SNOWBOY_CXX11_COMPAT) | ||
add_compile_options(-D_GLIBCXX_USE_CXX11_ABI=0) | ||
endif() | ||
|
||
add_compile_options(-std=c++0x -Wall -Wno-sign-compare -Wno-unused-local-typedefs -Winit-self -rdynamic) | ||
add_compile_options(-DHAVE_POSIX_MEMALIGN -I. -fno-omit-frame-pointer -fPIC -msse -msse2) | ||
add_compile_options("$<$<CONFIG:DEBUG>:-fsanitize=address>") | ||
add_link_options(-rdynamic) | ||
add_link_options("$<$<CONFIG:DEBUG>:-fsanitize=address>") | ||
|
||
if(SNOWMAN_CXX11_COMPAT) | ||
add_compile_options(-D_GLIBCXX_USE_CXX11_ABI=0) | ||
endif() | ||
|
||
add_subdirectory(lib) | ||
add_subdirectory(apps) | ||
add_subdirectory(test) | ||
if(SNOWMAN_BUILD_APPS) | ||
add_subdirectory(apps) | ||
endif() | ||
if(SNOWMAN_BUILD_TESTS) | ||
add_subdirectory(test) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.