Skip to content

Commit

Permalink
Feature: Add ENABLE_RAPIDJSON option to control the output of abacus.…
Browse files Browse the repository at this point in the history
…json (deepmodeling#3519)

Add ENABLE_RAPIDJSON option to control the output of abacus.json
  • Loading branch information
pxlxingliang authored Jan 19, 2024
1 parent 722962e commit af8ccfb
Show file tree
Hide file tree
Showing 14 changed files with 1,763 additions and 15 deletions.
28 changes: 28 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,34 @@ option(DEBUG_INFO "Print message for developers to debug." OFF)
option(ENABLE_NATIVE_OPTIMIZATION "Enable compilation optimization for the native machine's CPU type" OFF)
option(COMMIT_INFO "Print commit information in log" ON)
option(ENABLE_FFT_TWO_CENTER "Enable FFT-based two-center integral method." ON)
option(ENABLE_RAPIDJSON "Enable rapid-json usage." OFF)



# enable json support
if(ENABLE_RAPIDJSON)
find_package(RapidJSON)
if(NOT RapidJSON_FOUND)
message(WARNING "Rapidjson is not found, trying downloading from github, or you can install Rapidjson first and reinstall abacus.")
include(FetchContent)
FetchContent_Declare(
rapidjson
GIT_REPOSITORY https://github.com/Tencent/rapidjson.git
GIT_TAG "origin/master"
GIT_SHALLOW TRUE
GIT_PROGRESS TRUE
)
set(RAPIDJSON_BUILD_TESTS OFF CACHE INTERNAL "")
set(RAPIDJSON_BUILD_EXAMPLES OFF CACHE INTERNAL "")
FetchContent_MakeAvailable(rapidjson)
set(RapidJSON_INCLUDE_PATH "${rapidjson_SOURCE_DIR}/include")
endif()
add_compile_definitions(__RAPIDJSON)
add_definitions(-DRAPIDJSON_HAS_CXX11_NOEXCEPT=0)
include_directories(${RapidJSON_INCLUDE_PATH})
endif()


if (USE_CUDA)
set(USE_CUSOLVER_LCAO ON)
else()
Expand Down
Loading

0 comments on commit af8ccfb

Please sign in to comment.