summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 07:04:30 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-13 07:04:30 -0500
commitee7e1bf35f277c44711f2560bb30248f2b3dff3b (patch)
treed66dab297f2ad1e39d480a5e8eff42e93db50d43 /CMakeLists.txt
parente9fadc4c6a4c04ff5ad9ef9ed32182f415c20230 (diff)
downloadhorizon-ee7e1bf35f277c44711f2560bb30248f2b3dff3b.tar.gz
horizon-ee7e1bf35f277c44711f2560bb30248f2b3dff3b.tar.bz2
horizon-ee7e1bf35f277c44711f2560bb30248f2b3dff3b.tar.xz
horizon-ee7e1bf35f277c44711f2560bb30248f2b3dff3b.zip
build: Add gcov support
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt12
1 files changed, 11 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b854c6e..31fffe1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,7 +10,17 @@ pkg_check_modules(LIBUDEV REQUIRED libudev)
pkg_check_modules(PARTED REQUIRED libparted)
find_library(BCNM_LIBRARY REQUIRED wpactrl PATH_SUFFIXES bcnm)
+option(BUILD_TOOLS "Enable building of tools (Validator, Simulator, etc)" ON)
+option(COVERAGE "Build for code coverage tests (slow)" OFF)
+
+IF(COVERAGE)
+ SET(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} --coverage")
+ SET(CMAKE_EXE_LINKER_FLAGS_DEBUG "${CMAKE_EXE_LINKER_FLAGS_DEBUG} --coverage")
+ENDIF(COVERAGE)
+
include_directories(.)
add_subdirectory(hscript)
-add_subdirectory(tools)
+IF(BUILD_TOOLS)
+ add_subdirectory(tools)
+ENDIF(BUILD_TOOLS)