21 lines
712 B
CMake
21 lines
712 B
CMake
# tools.cmake — on-demand tool activation via `-DUSE_<TOOL>=<VALUE>`.
|
|
|
|
# only activate tools for top level project
|
|
if(NOT PROJECT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
|
return()
|
|
endif()
|
|
|
|
include(${CMAKE_CURRENT_LIST_DIR}/CPM.cmake)
|
|
|
|
# enables sanitizers support using the `USE_SANITIZER` flag; available values are: Address,
|
|
# Memory, MemoryWithOrigins, Undefined, Thread, Leak, 'Address;Undefined'
|
|
if(USE_SANITIZER)
|
|
CPMAddPackage("gh:StableCoder/cmake-scripts#25.08")
|
|
include(${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)
|
|
CPMAddPackage("gh:TheLartians/Ccache.cmake@1.2.4")
|
|
endif()
|