-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Version update and new policy regarding static analysis
- Loading branch information
Showing
3 changed files
with
14 additions
and
21 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
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 |
---|---|---|
@@ -1,23 +1,3 @@ | ||
add_executable(unit unit.c) | ||
add_test(unit unit) | ||
target_link_libraries(unit PRIVATE xor_singleheader) | ||
|
||
|
||
# full warnings with sanitizers for tests. Include debug symbols and | ||
# only -O2 to maintain some debugability. | ||
if (MSVC) | ||
# limited support for MSVC, this is not tested | ||
list(APPEND TEST_COMPILE_OPTIONS /W4 /fsanitize=address) | ||
else() # *nix | ||
list(APPEND TEST_COMPILE_OPTIONS -g -O2 | ||
-Wall -Wextra) | ||
|
||
if (NOT MINGW) # sanitizers are not supported under mingw | ||
list(APPEND TEST_COMPILE_OPTIONS -fsanitize=address,undefined) | ||
# sanitsizers need to be specified at link time as well | ||
target_link_options(unit PRIVATE -fsanitize=address,undefined) | ||
endif() | ||
endif() | ||
|
||
target_compile_options(unit PRIVATE ${TEST_COMPILE_OPTIONS}) | ||
|