Skip to content

Commit d929fcd

Browse files
committed
Use nlohmann json as external dependency
1 parent a3ae5aa commit d929fcd

File tree

9 files changed

+107
-24676
lines changed

9 files changed

+107
-24676
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
/deps/
22
/build/
3+
4+
#CLion-created directories.
5+
/cmake-build-debug/*
6+
/cmake-build-release/*
7+
/cmake-build-minsizerel*
8+
/cmake-build-relwithdebinfo*
9+
10+
/.idea/*

CMakeLists.txt

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
1-
cmake_minimum_required(VERSION 3.0)
1+
cmake_minimum_required(VERSION 3.16)
22

33
project(sdptransform VERSION 1.2.10)
44

5-
# For CMake >= 3.1.
6-
set(CMAKE_CXX_STANDARD 14)
7-
set(CMAKE_CXX_STANDARD_REQUIRED ON)
8-
set(CMAKE_CXX_EXTENSIONS OFF)
9-
# For CMake < 3.1.
10-
add_compile_options(-std=c++14)
5+
set(CMAKE_CXX_STANDARD 17)
116

12-
add_subdirectory(test readme-helper)
7+
option(BUILD_TESTS "Build unit tests" OFF)
8+
option(BUILD_UTILS "Build utility applications" OFF)
9+
10+
find_package(nlohmann_json 3.11.3 REQUIRED)
11+
12+
if(nlohmann_json_FOUND)
13+
include_directories(${nlohmann_json_INCLUDE_DIRS})
14+
else()
15+
message(STATUS "nlohmann::json NOT Found !")
16+
endif(nlohmann_json_FOUND)
17+
18+
if (${BUILD_TESTS})
19+
add_subdirectory(test)
20+
endif()
21+
22+
if (${BUILD_UTILS})
23+
add_subdirectory(utils)
24+
endif()
1325

1426
include_directories(${sdptransform_SOURCE_DIR}/include)
1527

@@ -24,7 +36,6 @@ set(
2436
set(
2537
HEADER_FILES
2638
include/sdptransform.hpp
27-
include/json.hpp
2839
)
2940

3041
add_library(sdptransform STATIC ${SOURCE_FILES})

0 commit comments

Comments
 (0)