Skip to content

Commit

Permalink
Add back RapidJSON dependency
Browse files Browse the repository at this point in the history
RapidJSON was originally removed from the CCI source tree, but since
RapidJSON does not release regularly we should ship the dependency
with CCI. This also improves the out-of-the-box experience when using
add_subdirectory() to import CCI into a CMake project.

Signed-off-by: Lukas Jünger <[email protected]>
  • Loading branch information
aut0 committed Apr 16, 2024
1 parent f5a5497 commit 11b230b
Show file tree
Hide file tree
Showing 42 changed files with 19,123 additions and 7 deletions.
5 changes: 4 additions & 1 deletion NOTICE
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
== Version 2.0, in this case for the SystemC CCI Configuration ==
== standard. ==
=========================================================================

This product includes software developed by Accellera Systems Initiative
8698 Elk Grove Bldv Suite 1, #114, Elk Grove, CA 95624, USA
Copyright 2009-2022 Accellera Systems Initiative Inc. (Accellera).
Expand Down Expand Up @@ -48,3 +48,6 @@ This product includes software developed by Texas Instruments Inc.
12500 TI Boulevard, Dallas, TX 75243, USA
Copyright 2010-2019 Texas Instruments Inc.
All rights reserved.

This product contains a copy of the RapidJSON library licensed under the MIT
license found in src/rapidjson/license.txt.
11 changes: 5 additions & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,7 @@ set (CMAKE_CXX_STANDARD ${SystemC_CXX_STANDARD} CACHE STRING
set (CMAKE_CXX_STANDARD_REQUIRED ${SystemC_CXX_STANDARD_REQUIRED} CACHE BOOL
"The with CMAKE_CXX_STANDARD selected C++ standard is a requirement.")

find_package(RapidJSON CONFIG REQUIRED)

target_link_libraries(cci SystemC::systemc)

target_link_libraries(cci PUBLIC SystemC::systemc)

add_library (SystemC::cci ALIAS cci)

Expand Down Expand Up @@ -135,9 +132,11 @@ target_compile_options(
target_include_directories(cci
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

target_include_directories(cci
PRIVATE
${RAPIDJSON_INCLUDE_DIRS})
${CMAKE_CURRENT_SOURCE_DIR}/rapidjson/include)

if (APPLE)
# It's OK that _sc_main is an undefined symbol.
Expand Down
1 change: 1 addition & 0 deletions src/rapidjson/VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
RapidJSON commit ID: 3f73edae00aba5b0112a80b4d41e6f1ff7d92a3d
Loading

0 comments on commit 11b230b

Please sign in to comment.