Skip to content

Commit

Permalink
[JSONExporter] Replace bundled Jsoncpp with llvm/Support/JSON.h. NFC.
Browse files Browse the repository at this point in the history
Differential Revision: https://reviews.llvm.org/D49950

llvm-svn: 338461
  • Loading branch information
Meinersbur committed Aug 1, 2018
1 parent 83c49e8 commit 2365502
Show file tree
Hide file tree
Showing 22 changed files with 80 additions and 6,666 deletions.
15 changes: 0 additions & 15 deletions polly/CMakeLists.txt
Expand Up @@ -134,25 +134,10 @@ else()
set(ISL_TARGET PollyISL)
endif()

option(POLLY_BUNDLED_JSONCPP "Use the bundled version of jsoncpp included in Polly" ON)
if (POLLY_BUNDLED_JSONCPP)
set(JSONCPP_INCLUDE_DIRS "${CMAKE_CURRENT_SOURCE_DIR}/lib/External/JSON/include")
set(JSONCPP_LIBRARIES)
set(POLLY_JSON_FILES
External/JSON/json_reader.cpp
External/JSON/json_value.cpp
External/JSON/json_writer.cpp
)
else ()
find_package(Jsoncpp REQUIRED)
set(POLLY_JSON_FILES)
endif ()

include_directories(
BEFORE
${CMAKE_CURRENT_SOURCE_DIR}/include
${ISL_INCLUDE_DIRS}
${JSONCPP_INCLUDE_DIRS}
${CMAKE_CURRENT_SOURCE_DIR}/lib/External/pet/include
${CMAKE_CURRENT_SOURCE_DIR}/lib/External
${CMAKE_CURRENT_BINARY_DIR}/include
Expand Down
57 changes: 0 additions & 57 deletions polly/cmake/FindJsoncpp.cmake

This file was deleted.

2 changes: 0 additions & 2 deletions polly/cmake/PollyConfig.cmake.in
Expand Up @@ -5,7 +5,6 @@ find_package(LLVM REQUIRED CONFIG

set(Polly_CMAKE_DIR ${CMAKE_CURRENT_LIST_DIR})
set(Polly_BUNDLED_ISL @POLLY_BUNDLED_ISL@)
set(Polly_BUNDLED_JSONCPP @POLLY_BUNDLED_JSONCPP@)
set(Polly_ENABLE_GPGPU_CODEGEN @POLLY_ENABLE_GPGPU_CODEGEN@)

set(Polly_DEFINITIONS ${LLVM_DEFINITIONS})
Expand All @@ -28,7 +27,6 @@ if (NOT TARGET Polly)
if (Polly_ENABLE_GPGPU_CODEGEN)
set_property(TARGET Polly APPEND PROPERTY INTERFACE_LINK_LIBRARIES PollyPPCG)
endif()
set_property(TARGET Polly APPEND PROPERTY INTERFACE_LINK_LIBRARIES @JSONCPP_LIBRARIES@)
endif()

if (NOT TARGET LLVMPolly)
Expand Down
4 changes: 1 addition & 3 deletions polly/lib/CMakeLists.txt
Expand Up @@ -52,7 +52,6 @@ add_library(PollyCore OBJECT
Support/ISLTools.cpp
Support/DumpModulePass.cpp
Support/VirtualInstruction.cpp
${POLLY_JSON_FILES}
Transform/Canonicalization.cpp
Transform/CodePreparation.cpp
Transform/DeadCodeElimination.cpp
Expand All @@ -77,7 +76,6 @@ set_target_properties(PollyCore PROPERTIES FOLDER "Polly")
add_polly_library(Polly $<TARGET_OBJECTS:PollyCore>)
target_link_libraries(Polly PUBLIC
${ISL_TARGET}
${JSONCPP_LIBRARIES}
)

# Additional dependencies for Polly-ACC.
Expand Down Expand Up @@ -145,7 +143,7 @@ else ()
# hosts. This is not the case for bugpoint. Use LLVM_POLLY_LINK_INTO_TOOLS=ON
# instead which will automatically resolve the additional dependencies by
# Polly.
target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET} ${JSONCPP_LIBRARIES})
target_link_libraries(LLVMPolly PUBLIC ${ISL_TARGET})
if (GPU_CODEGEN)
target_link_libraries(LLVMPolly PUBLIC PollyPPCG)
endif ()
Expand Down

0 comments on commit 2365502

Please sign in to comment.