Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make rapidjson dependency managed at cmake configure step #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
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
5 changes: 3 additions & 2 deletions epik/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ if (NOT DEFINED ENABLE_AVX512)
set(ENABLE_AVX512 OFF)
endif()

find_package(RapidJSON REQUIRED)
#find_package(RapidJSON REQUIRED)

find_package(Boost REQUIRED COMPONENTS filesystem)

if(ENABLE_OMP)
Expand Down Expand Up @@ -44,7 +45,7 @@ else()
message(STATUS "EPIK: Vectorization DISABLED")
endif()

message(STATUS "RapidJSON: " ${RAPIDJSON_INCLUDE_DIRS})
message(STATUS "RapidJSON: " ${RAPIDJSON_INCLUDE_DIRS} ${RapidJSON_INCLUDE_DIR})
# RapidJSON cmake scripts are different between versions
set(RapidJSON_INCLUDES ${RAPIDJSON_INCLUDE_DIRS} ${RapidJSON_INCLUDE_DIR})

Expand Down
22 changes: 22 additions & 0 deletions epik/rapidjson.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
include(ExternalProject)

# Download RapidJSON
ExternalProject_Add(
rapidjson
PREFIX "rapidjson"
GIT_REPOSITORY "https://github.com/Tencent/rapidjson.git"
GIT_TAG f54b0e47a08782a6131cc3d60f94d038fa6e0a51
TIMEOUT 10
CMAKE_ARGS
-DRAPIDJSON_BUILD_TESTS=OFF
-DRAPIDJSON_BUILD_DOC=OFF
-DRAPIDJSON_BUILD_EXAMPLES=OFF
CONFIGURE_COMMAND ""
BUILD_COMMAND ""
INSTALL_COMMAND ""
UPDATE_COMMAND ""
)

# Prepare RapidJSON (RapidJSON is a header-only library)
ExternalProject_Get_Property(rapidjson source_dir)
set(RAPIDJSON_INCLUDE_DIRS ${source_dir}/include)
Loading