File tree 2 files changed +20
-6
lines changed
2 files changed +20
-6
lines changed Original file line number Diff line number Diff line change @@ -67,3 +67,12 @@ script:
67
67
- cmake .. -Dnlohmann_json_DIR=.. ${CMAKE_OPTIONS} -GNinja && cmake --build . --config Release
68
68
- ctest -C Release -V -j
69
69
- cd ..
70
+
71
+ # Remove previous build and tests
72
+ - rm -r build
73
+
74
+ # Compile and execute with Hunter package manager instead of using local json.hpp
75
+ - mkdir -p build && cd build
76
+ - cmake .. -DHUNTER_ENABLED=ON ${CMAKE_OPTIONS} -GNinja && cmake --build . --config Release
77
+ - ctest -C Release -V -j
78
+ - cd ..
Original file line number Diff line number Diff line change
1
+ # Add Hunter support (Disabled by default)
2
+ option (HUNTER_ENABLED "Enable Hunter package manager support" OFF )
3
+ if (HUNTER_ENABLED)
4
+ include ("cmake/HunterGate.cmake" )
5
+ HunterGate(
6
+ URL "https://github.com/cpp-pm/hunter/archive/v0.23.262.tar.gz"
7
+ SHA1 "eb51e633e08cdbe2153caf255e9c23968fecb29d"
8
+ )
9
+ endif ()
10
+
1
11
project (nlohmann_json_schema_validator
2
12
LANGUAGES CXX)
3
13
@@ -8,13 +18,8 @@ cmake_minimum_required(VERSION 3.2)
8
18
option (BUILD_TESTS "Build tests" ON )
9
19
option (BUILD_EXAMPLES "Build examples" ON )
10
20
11
- option (HUNTER_ENABLED "Enable Hunter package manager support" OFF )
21
+ # Add nlohmann_json::nlohmann_json using Hunter package manager
12
22
if (HUNTER_ENABLED)
13
- include (cmake/HunterGate.cmake)
14
- HunterGate(URL https://github.com/cpp-pm/hunter/archive/v0.23.253.tar.gz
15
- SHA1 88ea6d37c897a81a080eb9ae0f69d7807bbb3c73)
16
-
17
- # Add nlohmann_json::nlohmann_json (if HUNTER_ENABLED=ON, otherwise command is ignored)
18
23
hunter_add_package(nlohmann_json)
19
24
endif ()
20
25
You can’t perform that action at this time.
0 commit comments