Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 1 addition & 31 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ option(PHASAR_BUILD_IR "Build IR test code (default is OFF)" OFF)

option(PHASAR_BUILD_DOC "Build documentation" OFF)

option(PHASAR_DEBUG_LIBDEPS "Debug internal library dependencies (private linkage)" OFF)

option(BUILD_SHARED_LIBS "Build shared libraries (default is ON)" ON)

option(PHASAR_ENABLE_WARNINGS "Enable warnings" ON)
Expand Down Expand Up @@ -105,6 +103,7 @@ endif()
# Boost
find_package(Boost 1.65.1 COMPONENTS filesystem graph system program_options log ${BOOST_THREAD} REQUIRED)
include_directories(${Boost_INCLUDE_DIRS})
add_definitions(-DBOOST_LOG_DYN_LINK)

# JSON library
option(JSON_BuildTests OFF)
Expand Down Expand Up @@ -234,8 +233,6 @@ if (PHASAR_BUILD_IR)
add_subdirectory(test)
endif()

set(INCLUDE_INSTALL_DIR include/ CACHE PATH "Install dir of headers")

# Install targets of phasar-llvm, other executables, and libraries are to be
# found in the individual subdirectories of tools/

Expand Down Expand Up @@ -276,33 +273,6 @@ install(DIRECTORY config/
WORLD_READ
)

install(EXPORT phasarTargets
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/phasar
NAMESPACE phasar::
FILE phasarTargets.cmake
)

include(CMakePackageConfigHelpers)
configure_package_config_file(
Config.cmake.in
phasarConfig.cmake
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/phasar
PATH_VARS INCLUDE_INSTALL_DIR
)

write_basic_package_version_file(
${CMAKE_CURRENT_BINARY_DIR}/phasarConfigVersion.cmake
VERSION 1.0.0
COMPATIBILITY SameMajorVersion
)

### Install Config and ConfigVersion files
install(
FILES "${CMAKE_CURRENT_BINARY_DIR}/phasarConfig.cmake"
"${CMAKE_CURRENT_BINARY_DIR}/phasarConfigVersion.cmake"
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/phasar"
)

# If the Phasar shared object libraries are not installed into a system folder
# the so libs must be added manually to the linker search path and the linker
# config must be updated as follows:
Expand Down
7 changes: 0 additions & 7 deletions Config.cmake.in

This file was deleted.

8 changes: 1 addition & 7 deletions cmake/phasar_macros.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ macro(add_phasar_library name)
set(libkind)
endif()
add_library( ${name} ${libkind} ${srcs} )
add_library( phasar::${name} ALIAS ${name} )
if( LLVM_COMMON_DEPENDS )
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
endif( LLVM_COMMON_DEPENDS )
Expand All @@ -173,11 +172,7 @@ macro(add_phasar_library name)

if(PHASAR_LINK_LIBS)
foreach(lib ${PHASAR_LINK_LIBS})
if(PHASAR_DEBUG_LIBDEPS)
target_link_libraries(${name} LINK_PRIVATE ${lib})
else()
target_link_libraries(${name} LINK_PUBLIC ${lib})
endif(PHASAR_DEBUG_LIBDEPS)
target_link_libraries(${name} LINK_PRIVATE ${lib})
endforeach(lib)
endif(PHASAR_LINK_LIBS)

Expand All @@ -194,7 +189,6 @@ macro(add_phasar_library name)
endif(MSVC)
install(TARGETS ${name}
EXPORT LLVMExports
EXPORT phasarTargets
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})
Expand Down
41 changes: 0 additions & 41 deletions examples/use-phasar-as-library/CMakeLists.txt

This file was deleted.

1 change: 0 additions & 1 deletion examples/use-phasar-as-library/README.md

This file was deleted.

76 changes: 0 additions & 76 deletions examples/use-phasar-as-library/myphasartool.cpp

This file was deleted.

4 changes: 0 additions & 4 deletions lib/PhasarClang/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@ file(GLOB_RECURSE PHASARCLANG_SRC *.h *.cpp)

include_directories(${CLANG_INCLUDE_DIRS})

set(PHASAR_LINK_LIBS
phasar_utils
)

set(LLVM_LINK_COMPONENTS
Support
Core
Expand Down
30 changes: 1 addition & 29 deletions lib/Utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ set(LLVM_LINK_COMPONENTS
BitWriter
)


if(BUILD_SHARED_LIBS)
add_phasar_library(phasar_utils
SHARED
Expand All @@ -28,40 +29,11 @@ else()
)
endif()

set(LLVM_LINK_COMPONENTS
coverage
coroutines
libdriver
lto
support
analysis
bitwriter
core
ipo
irreader
instcombine
instrumentation
linker
objcarcopts
scalaropts
transformutils
codegen
vectorize
)

llvm_map_components_to_libnames(llvm_libs
${LLVM_LINK_COMPONENTS}
)

target_include_directories(phasar_utils PUBLIC ${LLVM_INCLUDE_DIRS})
target_compile_definitions(phasar_utils PUBLIC -DBOOST_LOG_DYN_LINK)

find_package(Boost COMPONENTS log REQUIRED)
target_link_libraries(phasar_utils
LINK_PUBLIC
${Boost_LIBRARIES}
${CMAKE_DL_LIBS}
${llvm_libs}
)

set_target_properties(phasar_utils
Expand Down