Address PR comments
This commit is contained in:
parent
6a3c173aab
commit
13de893d55
@ -72,11 +72,21 @@ endif(CPPDAP_BUILD_TESTS)
|
|||||||
# JSON library
|
# JSON library
|
||||||
###########################################################
|
###########################################################
|
||||||
|
|
||||||
if((CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE AND CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE) OR
|
if(CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE)
|
||||||
(CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE AND CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE) OR
|
list(APPEND CPPDAP_EXTERNAL_JSON_PACKAGES "CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE")
|
||||||
(CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE AND CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE))
|
endif()
|
||||||
|
if(CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE)
|
||||||
|
list(APPEND CPPDAP_EXTERNAL_JSON_PACKAGES "CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE")
|
||||||
|
endif()
|
||||||
|
if(CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE)
|
||||||
|
list(APPEND CPPDAP_EXTERNAL_JSON_PACKAGES "CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE")
|
||||||
|
endif()
|
||||||
|
list(LENGTH CPPDAP_EXTERNAL_JSON_PACKAGES CPPDAP_EXTERNAL_JSON_PACKAGES_COUNT)
|
||||||
|
|
||||||
|
if(CPPDAP_EXTERNAL_JSON_PACKAGES_COUNT GREATER 1)
|
||||||
message(FATAL_ERROR "At most one of CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE, \
|
message(FATAL_ERROR "At most one of CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE, \
|
||||||
CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE, and CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE can be set.")
|
CPPDAP_USE_EXTERNAL_RAPIDJSON_PACKAGE, and CPPDAP_USE_EXTERNAL_JSONCPP_PACKAGE can \
|
||||||
|
be set, but ${CPPDAP_EXTERNAL_JSON_PACKAGES} were all set.")
|
||||||
elseif(CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE)
|
elseif(CPPDAP_USE_EXTERNAL_NLOHMANN_JSON_PACKAGE)
|
||||||
find_package(nlohmann_json CONFIG REQUIRED)
|
find_package(nlohmann_json CONFIG REQUIRED)
|
||||||
set(CPPDAP_JSON_LIBRARY "nlohmann")
|
set(CPPDAP_JSON_LIBRARY "nlohmann")
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Microsoft
|
// Copyright 2023 Google LLC
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
// Copyright 2023 Microsoft
|
// Copyright 2023 Google LLC
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
// you may not use this file except in compliance with the License.
|
// you may not use this file except in compliance with the License.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user