-
Notifications
You must be signed in to change notification settings - Fork 388
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add sanitizer support. closes #13. * add comment * add tools.cmake * document tools * cleanup * add tools to feature list
- Loading branch information
1 parent
62469ec
commit cec2e8c
Showing
3 changed files
with
51 additions
and
5 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,33 @@ | ||
# this file contains a list of tools that can be activated and downloaded on-demand | ||
# each tool is enabled during configuration by passing an additional `-DUSE_<TOOL>=<VALUE>` argument to CMake | ||
|
||
# determine if a tool has already been enabled | ||
foreach(TOOL USE_SANITIZER;USE_CCACHE) | ||
get_property(${TOOL}_ENABLED GLOBAL "" PROPERTY ${TOOL}_ENABLED SET) | ||
endforeach() | ||
|
||
# enables sanitizers support using the the `USE_SANITIZER` flag | ||
# available values are: Address, Memory, MemoryWithOrigins, Undefined, Thread, Leak, 'Address;Undefined' | ||
if (USE_SANITIZER AND NOT USE_SANITIZER_ENABLED) | ||
set_property(GLOBAL PROPERTY USE_SANITIZER_ENABLED true) | ||
|
||
CPMAddPackage( | ||
NAME StableCoder-cmake-scripts | ||
GITHUB_REPOSITORY StableCoder/cmake-scripts | ||
GIT_TAG 3a469d8251660a97dbf9e0afff0a242965d40277 | ||
) | ||
|
||
include(${StableCoder-cmake-scripts_SOURCE_DIR}/sanitizers.cmake) | ||
endif() | ||
|
||
# enables CCACHE support through the USE_CCACHE flag | ||
# possible values are: YES, NO or equivalent | ||
if (USE_CCACHE AND NOT USE_CCACHE_ENABLED) | ||
set_property(GLOBAL PROPERTY USE_CCACHE_ENABLED true) | ||
|
||
CPMAddPackage( | ||
NAME Ccache.cmake | ||
GITHUB_REPOSITORY TheLartians/Ccache.cmake | ||
VERSION 1.1 | ||
) | ||
endif() |