llvm-toolchain/debian/patches/use-deb-json.diff
2017-05-04 19:01:32 +00:00

77 lines
2.6 KiB
Diff

---
polly/CMakeLists.txt | 5 ++++-
polly/lib/CMakeLists.txt | 14 +++++++-------
2 files changed, 11 insertions(+), 8 deletions(-)
Index: llvm-toolchain-snapshot_5.0~svn302180/polly/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_5.0~svn302180.orig/polly/CMakeLists.txt
+++ llvm-toolchain-snapshot_5.0~svn302180/polly/CMakeLists.txt
@@ -179,11 +179,13 @@ else()
set(ISL_TARGET PollyISL)
endif()
+find_path(JSONCPP_INCLUDE_PATH json/json.h PATH_SUFFIXES jsoncpp)
+
include_directories(
BEFORE
${CMAKE_CURRENT_SOURCE_DIR}/include
${ISL_INCLUDE_DIRS}
- ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/JSON/include
+# ${CMAKE_CURRENT_SOURCE_DIR}/lib/External/JSON/include
${CMAKE_CURRENT_SOURCE_DIR}/lib/External/pet/include
${CMAKE_CURRENT_SOURCE_DIR}/lib/External
${CMAKE_CURRENT_BINARY_DIR}/include
Index: llvm-toolchain-snapshot_5.0~svn302180/polly/lib/CMakeLists.txt
===================================================================
--- llvm-toolchain-snapshot_5.0~svn302180.orig/polly/lib/CMakeLists.txt
+++ llvm-toolchain-snapshot_5.0~svn302180/polly/lib/CMakeLists.txt
@@ -1,10 +1,10 @@
set(LLVM_NO_RTTI 1)
-set(POLLY_JSON_FILES
- External/JSON/json_reader.cpp
- External/JSON/json_value.cpp
- External/JSON/json_writer.cpp
-)
+#set(POLLY_JSON_FILES
+# External/JSON/json_reader.cpp
+# External/JSON/json_value.cpp
+# External/JSON/json_writer.cpp
+#)
set(ISL_CODEGEN_FILES
CodeGen/IslAst.cpp
@@ -57,7 +57,7 @@ add_library(PollyCore OBJECT
Support/ISLTools.cpp
Support/DumpModulePass.cpp
Support/VirtualInstruction.cpp
- ${POLLY_JSON_FILES}
+# ${POLLY_JSON_FILES}
Transform/Canonicalization.cpp
Transform/CodePreparation.cpp
Transform/DeadCodeElimination.cpp
@@ -77,6 +77,7 @@ set_target_properties(PollyCore PROPERTI
add_polly_library(Polly $<TARGET_OBJECTS:PollyCore>)
target_link_libraries(Polly
${ISL_TARGET}
+ jsoncpp
)
# Additional dependencies for Polly-ACC.
Index: llvm-toolchain-snapshot_5.0~svn302180/polly/lib/Exchange/JSONExporter.cpp
===================================================================
--- llvm-toolchain-snapshot_5.0~svn302180.orig/polly/lib/Exchange/JSONExporter.cpp
+++ llvm-toolchain-snapshot_5.0~svn302180/polly/lib/Exchange/JSONExporter.cpp
@@ -29,8 +29,8 @@
#include "isl/printer.h"
#include "isl/set.h"
#include "isl/union_map.h"
-#include "json/reader.h"
-#include "json/writer.h"
+#include "jsoncpp/json/reader.h"
+#include "jsoncpp/json/writer.h"
#include <memory>
#include <string>
#include <system_error>