From cd800522e42b81ae261c44d23e1559fc11649c40 Mon Sep 17 00:00:00 2001
From: Oleg Endo <olegendo@gcc.gnu.org>
Date: Tue, 11 Jul 2017 22:57:49 +0900
Subject: [PATCH] Rename BuildTests to JSON_BuildTests

This avoids potential conflicts with other libraries when the library is
built from source and included in a bigger cmake build.
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 30e39666..3463cd16 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,7 +5,7 @@ project(nlohmann_json VERSION 2.1.1 LANGUAGES CXX)
 
 enable_testing()
 
-option(BuildTests "Build the unit tests" ON)
+option(JSON_BuildTests "Build the unit tests" ON)
 
 # define project variables
 set(JSON_TARGET_NAME ${PROJECT_NAME})
@@ -25,7 +25,7 @@ target_include_directories(${JSON_TARGET_NAME} INTERFACE
   $<INSTALL_INTERFACE:${JSON_INCLUDE_DESTINATION}>)
 
 # create and configure the unit test target
-if(BuildTests)
+if(JSON_BuildTests)
     add_subdirectory(test)
 endif()