Skip to content
Merged
Show file tree
Hide file tree
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
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,6 @@ build
.cproject
.project
.settings/
.vscode/

# Vscode
.vscode/
17 changes: 17 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ if (BUILD_SV_INSTALLER)
add_subdirectory("${CMAKE_SOURCE_DIR}/Distribution")
ENDIF()

# NLOHMANN JSON FOR SERIALIZATION
include(FetchContent)
FetchContent_Declare(
nlohmann_json
GIT_REPOSITORY https://github.com/nlohmann/json.git
GIT_TAG v3.11.2 # You can specify a version or use the latest tag
)
FetchContent_MakeAvailable(nlohmann_json)
target_include_directories(${PROJECT_NAME} PUBLIC ${nlohmann_json_SOURCE_DIR}/single_include)

# Unit tests and Google Test
if(ENABLE_UNIT_TEST)

Expand Down Expand Up @@ -164,6 +174,13 @@ if(ENABLE_UNIT_TEST)
# handle both use cases.
target_link_libraries(UnitTestsExecutable gtest gtest_main pthread)

# We need to include Nlohmann when compiling the unit test executable
# A better strategy would be to build up a list of what we're going to
# include and reuse it.
# Another option: we could simply build the library of cvOneD functionality
# and link against that both here and in the main executable.
target_include_directories(UnitTestsExecutable PRIVATE ${nlohmann_json_SOURCE_DIR}/single_include)

# It's likely we'll need to include additional directories for some
# versions of the unit tests. That can be updated when/if we update
# the general strategy.
Expand Down
Loading