-
Notifications
You must be signed in to change notification settings - Fork 16
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
4 changed files
with
67 additions
and
49 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 |
---|---|---|
@@ -0,0 +1,18 @@ | ||
set(CMAKE_C_COMPILER gcc) | ||
set(CMAKE_CXX_COMPILER g++) | ||
set(CMAKE_GENERATOR "Ninja Multi-Config") | ||
|
||
if(BEMAN_BUILDSYS_SANITIZER STREQUAL "ASan") | ||
set(CMAKE_CXX_FLAGS_DEBUG_INIT | ||
"-fsanitize=address -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined" | ||
) | ||
set(CMAKE_C_FLAGS_DEBUG_INIT | ||
"-fsanitize=address -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined" | ||
) | ||
elseif(BEMAN_BUILDSYS_SANITIZER STREQUAL "TSan") | ||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-fsanitize=thread") | ||
set(CMAKE_C_FLAGS_DEBUG_INIT "-fsanitize=thread") | ||
endif() | ||
|
||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O3") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O3") |
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 @@ | ||
set(CMAKE_C_COMPILER clang) | ||
set(CMAKE_CXX_COMPILER clang++) | ||
set(CMAKE_GENERATOR "Ninja Multi-Config") | ||
|
||
if(BEMAN_BUILDSYS_SANITIZER STREQUAL "ASan") | ||
set(CMAKE_CXX_FLAGS_DEBUG_INIT | ||
"-fsanitize=address -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined" | ||
) | ||
set(CMAKE_C_FLAGS_DEBUG_INIT | ||
"-fsanitize=address -fsanitize=leak -fsanitize=pointer-compare -fsanitize=pointer-subtract -fsanitize=undefined" | ||
) | ||
elseif(BEMAN_BUILDSYS_SANITIZER STREQUAL "TSan") | ||
set(CMAKE_CXX_FLAGS_DEBUG_INIT "-fsanitize=thread") | ||
set(CMAKE_C_FLAGS_DEBUG_INIT "-fsanitize=thread") | ||
endif() | ||
|
||
set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O3") | ||
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO_INIT "-O3") |