-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
77 changed files
with
6,240 additions
and
5,448 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,18 @@ | ||
--- | ||
BasedOnStyle: LLVM | ||
UseTab: Never | ||
IndentWidth: 4 | ||
TabWidth: 4 | ||
BreakBeforeBraces: Linux | ||
AllowShortIfStatementsOnASingleLine: false | ||
IndentCaseLabels: true | ||
IndentGotoLabels: false | ||
IndentPPDirectives: AfterHash | ||
ColumnLimit: 80 | ||
AccessModifierOffset: -4 | ||
AlignAfterOpenBracket: DontAlign | ||
AlignConsecutiveMacros: true | ||
AlwaysBreakAfterReturnType: All | ||
SpaceAfterCStyleCast: true | ||
ForEachMacros: ['HG_QUEUE_FOREACH', 'HG_LIST_FOREACH'] | ||
... |
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,2 @@ | ||
build | ||
.vscode |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
set(ASAN_FLAG "-fsanitize=address") | ||
set(ASAN_C_FLAGS "-O1 -g ${ASAN_FLAG} -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls") | ||
set(ASAN_CXX_FLAGS ${ASAN_C_FLAGS}) | ||
|
||
get_property(ASAN_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) | ||
foreach(lang ${ASAN_LANGUAGES}) | ||
set(ASAN_${lang}_LANG_ENABLED 1) | ||
endforeach() | ||
|
||
if(ASAN_C_LANG_ENABLED) | ||
include(CheckCCompilerFlag) | ||
set(CMAKE_REQUIRED_LINK_OPTIONS ${ASAN_FLAG}) | ||
check_c_compiler_flag(${ASAN_FLAG} ASAN_C_FLAG_SUPPORTED) | ||
if(NOT ASAN_C_FLAG_SUPPORTED) | ||
message(STATUS "Asan flags are not supported by the C compiler.") | ||
else() | ||
if(NOT CMAKE_C_FLAGS_ASAN) | ||
set(CMAKE_C_FLAGS_ASAN ${ASAN_C_FLAGS} CACHE STRING "Flags used by the C compiler during ASAN builds." FORCE) | ||
endif() | ||
endif() | ||
unset(CMAKE_REQUIRED_LINK_OPTIONS) | ||
endif() | ||
|
||
if(ASAN_CXX_LANG_ENABLED) | ||
include(CheckCXXCompilerFlag) | ||
set(CMAKE_REQUIRED_LINK_OPTIONS ${ASAN_FLAG}) | ||
check_cxx_compiler_flag(${ASAN_FLAG} ASAN_CXX_FLAG_SUPPORTED) | ||
if(NOT ASAN_CXX_FLAG_SUPPORTED) | ||
message(STATUS "Asan flags are not supported by the CXX compiler.") | ||
else() | ||
if(NOT CMAKE_CXX_FLAGS_ASAN) | ||
set(CMAKE_CXX_FLAGS_ASAN ${ASAN_CXX_FLAGS} CACHE STRING "Flags used by the CXX compiler during ASAN builds." FORCE) | ||
endif() | ||
endif() | ||
unset(CMAKE_REQUIRED_LINK_OPTIONS) | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
set(TSAN_FLAG "-fsanitize=thread") | ||
set(TSAN_C_FLAGS "-O1 -g ${TSAN_FLAG}") | ||
set(TSAN_CXX_FLAGS ${TSAN_C_FLAGS}) | ||
|
||
get_property(TSAN_LANGUAGES GLOBAL PROPERTY ENABLED_LANGUAGES) | ||
foreach(lang ${TSAN_LANGUAGES}) | ||
set(TSAN_${lang}_LANG_ENABLED 1) | ||
endforeach() | ||
|
||
if(TSAN_C_LANG_ENABLED) | ||
include(CheckCCompilerFlag) | ||
set(CMAKE_REQUIRED_LINK_OPTIONS ${TSAN_FLAG}) | ||
check_c_compiler_flag(${TSAN_FLAG} TSAN_C_FLAG_SUPPORTED) | ||
if(NOT TSAN_C_FLAG_SUPPORTED) | ||
message(STATUS "Asan flags are not supported by the C compiler.") | ||
else() | ||
if(NOT CMAKE_C_FLAGS_TSAN) | ||
set(CMAKE_C_FLAGS_TSAN ${TSAN_C_FLAGS} CACHE STRING "Flags used by the C compiler during TSAN builds." FORCE) | ||
endif() | ||
endif() | ||
unset(CMAKE_REQUIRED_LINK_OPTIONS) | ||
endif() | ||
|
||
if(TSAN_CXX_LANG_ENABLED) | ||
include(CheckCXXCompilerFlag) | ||
set(CMAKE_REQUIRED_LINK_OPTIONS ${TSAN_FLAG}) | ||
check_cxx_compiler_flag(${TSAN_FLAG} TSAN_CXX_FLAG_SUPPORTED) | ||
if(NOT TSAN_CXX_FLAG_SUPPORTED) | ||
message(STATUS "Asan flags are not supported by the CXX compiler.") | ||
else() | ||
if(NOT CMAKE_CXX_FLAGS_TSAN) | ||
set(CMAKE_CXX_FLAGS_TSAN ${TSAN_CXX_FLAGS} CACHE STRING "Flags used by the CXX compiler during TSAN builds." FORCE) | ||
endif() | ||
endif() | ||
unset(CMAKE_REQUIRED_LINK_OPTIONS) | ||
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.