aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarat Dukhan <marat@fb.com>2017-10-17 15:23:06 -0700
committerMarat Dukhan <marat@fb.com>2017-10-17 15:23:06 -0700
commit6f35d78916158a35723475546822b32de8a3b713 (patch)
treeaa080df7ff34b2c862320f08ffd8729b5daf9bf3
parentbe01e8cf59f680e14bf5f1fc575a7a133a4a5d7d (diff)
downloadpthreadpool-6f35d78916158a35723475546822b32de8a3b713.tar.gz
Build tests and benchmarks in CMake build
-rw-r--r--CMakeLists.txt4
-rw-r--r--cmake/FindFXdiv.cmake2
-rw-r--r--cmake/FindGBenchmark.cmake2
3 files changed, 5 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index cd4b767..f849edb 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,8 +6,8 @@ INCLUDE(GNUInstallDirs)
PROJECT(pthreadpool LANGUAGES C CXX)
# ---[ Options.
-OPTION(PTHREADPOOL_BUILD_TESTS "Build pthreadpool unit tests" OFF)
-OPTION(PTHREADPOOL_BUILD_BENCHMARKS "Build pthreadpool micro-benchmarks" OFF)
+OPTION(PTHREADPOOL_BUILD_TESTS "Build pthreadpool unit tests" ON)
+OPTION(PTHREADPOOL_BUILD_BENCHMARKS "Build pthreadpool micro-benchmarks" ON)
# ---[ CMake options
LIST(APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
diff --git a/cmake/FindFXdiv.cmake b/cmake/FindFXdiv.cmake
index bdb6403..2dbac4f 100644
--- a/cmake/FindFXdiv.cmake
+++ b/cmake/FindFXdiv.cmake
@@ -2,6 +2,8 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.2 FATAL_ERROR)
FUNCTION(BUILD_FXDIV)
INCLUDE(ExternalProject)
+ SET(FXDIV_BUILD_TESTS OFF CACHE BOOL "")
+ SET(FXDIV_BUILD_BENCHMARKS OFF CACHE BOOL "")
ExternalProject_Add(fxdiv
GIT_REPOSITORY https://github.com/Maratyszcza/FXdiv.git
GIT_TAG master
diff --git a/cmake/FindGBenchmark.cmake b/cmake/FindGBenchmark.cmake
index bdadd00..2c034b6 100644
--- a/cmake/FindGBenchmark.cmake
+++ b/cmake/FindGBenchmark.cmake
@@ -2,7 +2,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 3.2 FATAL_ERROR)
FUNCTION(BUILD_GBENCHMARK)
INCLUDE(ExternalProject)
- SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "" FORCE)
+ SET(BENCHMARK_ENABLE_TESTING OFF CACHE BOOL "")
ExternalProject_Add(google_benchmark
URL https://github.com/google/benchmark/archive/v1.2.0.zip
URL_HASH SHA256=cc463b28cb3701a35c0855fbcefb75b29068443f1952b64dd5f4f669272e95ea