From 7b8561ad6f96fcf6f79ccbab395c7bb5a5f372db Mon Sep 17 00:00:00 2001 From: Tomasz Michalak Date: Tue, 8 Oct 2019 12:34:00 +0200 Subject: [PATCH] third_party: Add sanitizers-cmake module Signed-off-by: Tomasz Michalak --- .gitmodules | 3 +++ CMakeLists.txt | 3 +++ third_party/sanitizers-cmake | 1 + 3 files changed, 7 insertions(+) create mode 160000 third_party/sanitizers-cmake diff --git a/.gitmodules b/.gitmodules index 00799b4c..c6e5622f 100644 --- a/.gitmodules +++ b/.gitmodules @@ -22,3 +22,6 @@ [submodule "third_party/yosys"] path = third_party/yosys url = https://github.com/YosysHQ/yosys +[submodule "third_party/sanitizers-cmake"] + path = third_party/sanitizers-cmake + url = https://github.com/arsenm/sanitizers-cmake.git diff --git a/CMakeLists.txt b/CMakeLists.txt index d93021c0..0dd67268 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,6 +3,9 @@ cmake_minimum_required(VERSION 3.5.0) project(prjxray) option(PRJXRAY_BUILD_TESTING "" OFF) +# Add sanitizers-cmake package +set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/third_party/sanitizers-cmake/cmake" ${CMAKE_MODULE_PATH}) +find_package(Sanitizers) if(NOT CMAKE_BUILD_TYPE) set(CMAKE_BUILD_TYPE Release CACHE STRING "Choose the type of build, options are: None Debug Release RelWithDebInfo MinSizeRel." diff --git a/third_party/sanitizers-cmake b/third_party/sanitizers-cmake new file mode 160000 index 00000000..99e159ec --- /dev/null +++ b/third_party/sanitizers-cmake @@ -0,0 +1 @@ +Subproject commit 99e159ec9bc8dd362b08d18436bd40ff0648417b