Skip to content
Open
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
6 changes: 3 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[submodule "external/rapidjson"]
path = external/rapidjson
url = https://github.com/Wire-Network/rapidjson.git
; [submodule "external/rapidjson"]
; path = external/rapidjson
; url = https://github.com/Wire-Network/rapidjson.git
[submodule "external/wirejs-native"]
path = external/wirejs-native
url = https://github.com/Wire-Network/wirejs-native
14 changes: 11 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
cmake_minimum_required (VERSION 3.8)
project(abieos VERSION 0.1 LANGUAGES CXX C)

if (NOT TARGET rapidjson)
find_package(RapidJSON REQUIRED)
if(NOT TARGET rapidjson)
message(FATAL_ERROR "RapidJSON not found!")
endif()
endif()
Comment on lines +6 to +11

Copilot AI Sep 30, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logic is inconsistent: find_package(RapidJSON REQUIRED) should create a target, but the code checks for rapidjson (lowercase) while the package name is RapidJSON (camelcase). The target name created by find_package may be different. Consider using RapidJSON::RapidJSON or check the actual target name created by the RapidJSON CMake package.

Copilot uses AI. Check for mistakes.

set(default_build_type "Release")

if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
Expand Down Expand Up @@ -38,20 +45,21 @@ include(GNUInstallDirs)
add_library(abieos STATIC src/abi.cpp src/crypto.cpp include/sysio/fpconv.c)
target_include_directories(abieos PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/include"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/external/rapidjson/include"
"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

target_link_libraries(abieos rapidjson)

Copilot AI Sep 30, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The target name rapidjson may not exist. RapidJSON typically creates targets like RapidJSON::RapidJSON. Verify the correct target name from the RapidJSON package documentation or use rapidjson::rapidjson if that's the expected target.

Copilot uses AI. Check for mistakes.

if(ABIEOS_NO_INT128)
target_compile_definitions(abieos PUBLIC ABIEOS_NO_INT128)
endif()

add_library(abieos_module MODULE src/abieos.cpp src/abi.cpp src/crypto.cpp include/sysio/fpconv.c)
target_include_directories(abieos_module PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/include;"
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>/external/rapidjson/include"

"$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>")

target_link_libraries(abieos_module ${CMAKE_THREAD_LIBS_INIT})
target_link_libraries(abieos_module ${CMAKE_THREAD_LIBS_INIT} rapidjson)

Copilot AI Sep 30, 2025

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same issue as above - the target name rapidjson may not be correct. Should use the proper target name created by the RapidJSON package.

Copilot uses AI. Check for mistakes.
set_target_properties(abieos_module PROPERTIES OUTPUT_NAME "abieos")

enable_testing()
Expand Down
1 change: 0 additions & 1 deletion external/rapidjson
Submodule rapidjson deleted from 476ffa