Skip to content

Commit

Permalink
Merge pull request #666 from effolkronium/develop
Browse files Browse the repository at this point in the history
enable_testing only if the JSON_BuildTests is ON
  • Loading branch information
nlohmann authored Jul 27, 2017
2 parents 7d51214 + a27dd3a commit c136b6f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ cmake_minimum_required(VERSION 3.0)
# define the project
project(nlohmann_json VERSION 2.1.1 LANGUAGES CXX)

enable_testing()

option(JSON_BuildTests "Build the unit tests" ON)

# define project variables
Expand All @@ -26,6 +24,7 @@ target_include_directories(${JSON_TARGET_NAME} INTERFACE

# create and configure the unit test target
if(JSON_BuildTests)
enable_testing()
add_subdirectory(test)
endif()

Expand Down

0 comments on commit c136b6f

Please sign in to comment.