summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Koronchik <denis.koronchik@gmail.com>2021-07-21 18:37:20 +0200
committerDenis Koronchik <denis.koronchik@gmail.com>2021-07-21 18:37:20 +0200
commit83d4569e13b9bf8d194771db19fee1c999cf2b22 (patch)
treebeae3bfe2f8f1a2a580c405d5721a41de2449188
parentcf734a2fec960025350d8de0d01ad38aeae155a0 (diff)
downloadqtlocation-mapboxgl-83d4569e13b9bf8d194771db19fee1c999cf2b22.tar.gz
Add possibility to disable test and benchmark compilationupstream/kdn-cmake-config
-rw-r--r--CMakeLists.txt14
1 files changed, 11 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ad989ba838..dfbf7d7f2a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -22,6 +22,8 @@ option(MBGL_WITH_SANITIZER "Use [address|thread|undefined] here" OFF)
option(MBGL_WITH_RTTI "Compile with runtime type information" OFF)
option(MBGL_WITH_OPENGL "Build with OpenGL renderer" ON)
option(MBGL_WITH_WERROR "Make all compilation warnings errors" ON)
+option(MBGL_WITH_TESTS "Enable tests compilation" ON)
+option(MBGL_WITH_BENCHMARK "Enable benchmark compilation" ON)
add_library(
mbgl-compiler-options INTERFACE
@@ -1044,9 +1046,15 @@ else()
message(FATAL_ERROR "Unsupported target platform: " ${CMAKE_SYSTEM_NAME})
endif()
-add_subdirectory(${PROJECT_SOURCE_DIR}/test)
-add_subdirectory(${PROJECT_SOURCE_DIR}/benchmark)
-add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)
+if (${MBGL_WITH_TESTS})
+ add_subdirectory(${PROJECT_SOURCE_DIR}/test)
+ add_subdirectory(${PROJECT_SOURCE_DIR}/render-test)
+endif()
+
+if (${MBGL_WITH_BENCHMARK})
+ add_subdirectory(${PROJECT_SOURCE_DIR}/benchmark)
+endif()
+
if(EXISTS ${PROJECT_SOURCE_DIR}/internal/internal.cmake)
include(${PROJECT_SOURCE_DIR}/internal/internal.cmake)