Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enable_testing only if the JSON_BuildTests is ON #666

Merged
merged 1 commit into from
Jul 27, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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