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
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ option(USE_VENDORED_PYBIND11 "Use vendored 'pybind11' Python library" ON)
option(USE_VENDORED_SPDLOG "Use vendored 'spdlog' library" ON)
option(USE_VENDORED_QUAZIP "Use vendored 'quazip' library" ON)
option(USE_VENDORED_IGRAPH "Use vendored 'igraph' library" ON)
option(USE_VENDORED_NLOHMANN_JSON "Use vendored 'nlohmann_json' library" ON)
option(BUILD_ALL_PLUGINS "Build all available plugins" OFF)
option(BUILD_TESTS "Enable test builds" OFF)
option(BUILD_COVERAGE "Enable code coverage build" OFF)
Expand Down
20 changes: 15 additions & 5 deletions cmake/detect_dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -193,11 +193,21 @@ set_target_properties(subprocess::subprocess PROPERTIES
# ###############################
# #### nlohmann_json
# ###############################
message(STATUS "using nlohmann_json from deps")
add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/deps/nlohmann_json"
)
if(USE_VENDORED_NLOHMANN_JSON)
message(STATUS "using nlohmann_json from deps")
add_library(nlohmann_json::nlohmann_json INTERFACE IMPORTED)
set_target_properties(nlohmann_json::nlohmann_json PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_SOURCE_DIR}/deps/nlohmann_json"
)
else()
find_package(nlohmann_json REQUIRED)
if(nlohmann_json_FOUND)
get_target_property(NLOHMANN_JSON_HEADERS_DIR nlohmann_json::nlohmann_json INTERFACE_INCLUDE_DIRECTORIES)
message(STATUS "Using system's nlohmann_json headers at ${NLOHMANN_JSON_HEADERS_DIR}")
else()
message(FATAL_ERROR "nlohmann_json was not found and USE_VENDORED_NLOHMANN_JSON is OFF")
endif()
endif()


# ###############################
Expand Down
4 changes: 3 additions & 1 deletion plugins/graph_algorithm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ if(PL_GRAPH_ALGORITHM OR BUILD_ALL_PLUGINS)
LINK_LIBRARIES PUBLIC ${igraph_LIBRARIES}
)

add_dependencies(graph_algorithm igraph_0_10)
if(USE_VENDORED_IGRAPH)
add_dependencies(graph_algorithm igraph_0_10)
endif()

endif()
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "module_identification/candidates/base_candidate.h"
#include "module_identification/candidates/functional_candidate.h"
#include "module_identification/types/candidate_types.h"
#include "nlohmann_json/json.hpp"
#include "nlohmann/json.hpp"

#include <map>
#include <mutex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
#include "hal_core/netlist/net.h"
#include "hal_core/netlist/netlist.h"
#include "hal_core/utilities/token_stream.h"
#include "nlohmann_json/json.hpp"
#include "nlohmann/json.hpp"
#include "rapidjson/document.h"
#include "resynthesis/resynthesis.h"
#include "z3_utils/netlist_comparison.h"
Expand Down
2 changes: 1 addition & 1 deletion plugins/z3_utils/src/netlist_comparison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#include "hal_core/netlist/net.h"
#include "hal_core/netlist/netlist.h"
#include "hal_core/utilities/log.h"
#include "nlohmann_json/json.hpp"
#include "nlohmann/json.hpp"
#include "z3_utils/z3_utils.h"

namespace hal
Expand Down