Include jsonCPP headers via #include "json/json.h"

Don't use #include "include/json/json.h" which is unusual and therefore confusing
This allows to remove the header symlinking done for the system lib version

Closes #42303
This commit is contained in:
Alexander Grund 2020-08-20 16:39:40 +02:00
parent 6787ce30ef
commit 20a00a0328
No known key found for this signature in database
GPG Key ID: E92C451FC21EF13F
9 changed files with 8 additions and 35 deletions

View File

@ -30,7 +30,7 @@ limitations under the License.
#include <io.h> // for _mktemp #include <io.h> // for _mktemp
#endif #endif
#include "absl/base/macros.h" #include "absl/base/macros.h"
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/lib/gtl/map_util.h" #include "tensorflow/core/lib/gtl/map_util.h"
#include "tensorflow/core/platform/cloud/curl_http_request.h" #include "tensorflow/core/platform/cloud/curl_http_request.h"
#include "tensorflow/core/platform/cloud/file_block_cache.h" #include "tensorflow/core/platform/cloud/file_block_cache.h"

View File

@ -24,7 +24,7 @@ limitations under the License.
#include <utility> #include <utility>
#include "absl/strings/match.h" #include "absl/strings/match.h"
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/platform/base64.h" #include "tensorflow/core/platform/base64.h"
#include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/errors.h" #include "tensorflow/core/platform/errors.h"

View File

@ -18,7 +18,7 @@ limitations under the License.
#include <memory> #include <memory>
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/platform/cloud/http_request.h" #include "tensorflow/core/platform/cloud/http_request.h"
#include "tensorflow/core/platform/env.h" #include "tensorflow/core/platform/env.h"
#include "tensorflow/core/platform/status.h" #include "tensorflow/core/platform/status.h"

View File

@ -21,7 +21,7 @@ limitations under the License.
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "absl/strings/str_format.h" #include "absl/strings/str_format.h"
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/platform/types.h" #include "tensorflow/core/platform/types.h"
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h" #include "tensorflow/core/profiler/protobuf/trace_events.pb.h"

View File

@ -15,7 +15,7 @@ limitations under the License.
#include "tensorflow/core/profiler/convert/trace_events_to_json.h" #include "tensorflow/core/profiler/convert/trace_events_to_json.h"
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/platform/protobuf.h" #include "tensorflow/core/platform/protobuf.h"
#include "tensorflow/core/platform/test.h" #include "tensorflow/core/platform/test.h"
#include "tensorflow/core/profiler/protobuf/trace_events.pb.h" #include "tensorflow/core/profiler/protobuf/trace_events.pb.h"

View File

@ -17,7 +17,7 @@ limitations under the License.
#define TENSORFLOW_CORE_PROFILER_INTERNAL_TFPROF_TIMELINE_H_ #define TENSORFLOW_CORE_PROFILER_INTERNAL_TFPROF_TIMELINE_H_
#include "absl/strings/str_cat.h" #include "absl/strings/str_cat.h"
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/framework/graph.pb.h" #include "tensorflow/core/framework/graph.pb.h"
#include "tensorflow/core/framework/step_stats.pb.h" #include "tensorflow/core/framework/step_stats.pb.h"
#include "tensorflow/core/profiler/internal/tfprof_node_show.h" #include "tensorflow/core/profiler/internal/tfprof_node_show.h"

View File

@ -20,7 +20,7 @@ limitations under the License.
#include <vector> #include <vector>
#include "flatbuffers/flexbuffers.h" // from @flatbuffers #include "flatbuffers/flexbuffers.h" // from @flatbuffers
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/core/framework/node_def.pb.h" #include "tensorflow/core/framework/node_def.pb.h"
#include "tensorflow/core/framework/node_def_util.h" #include "tensorflow/core/framework/node_def_util.h"
#include "tensorflow/core/framework/op.h" #include "tensorflow/core/framework/op.h"

View File

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
==============================================================================*/ ==============================================================================*/
#include "include/json/json.h" #include "json/json.h"
#include "tensorflow/lite/tools/list_flex_ops.h" #include "tensorflow/lite/tools/list_flex_ops.h"
namespace tflite { namespace tflite {

View File

@ -5,35 +5,8 @@ filegroup(
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )
HEADERS = [
"include/json/allocator.h",
"include/json/assertions.h",
"include/json/autolink.h",
"include/json/config.h",
"include/json/features.h",
"include/json/forwards.h",
"include/json/json.h",
"include/json/reader.h",
"include/json/value.h",
"include/json/version.h",
"include/json/writer.h",
]
genrule(
name = "link_headers",
outs = HEADERS,
cmd = """
for i in $(OUTS); do
i=$${i##*/}
ln -sf $(INCLUDEDIR)/jsoncpp/json/$$i $(@D)/include/json/$$i
done
""",
)
cc_library( cc_library(
name = "jsoncpp", name = "jsoncpp",
hdrs = HEADERS,
includes = ["."],
linkopts = ["-ljsoncpp"], linkopts = ["-ljsoncpp"],
visibility = ["//visibility:public"], visibility = ["//visibility:public"],
) )