Skip to content

Commit 11efe8d

Browse files
authored
Merge pull request #91 from secure-software-engineering/revert-90-f-CMakePackage
Revert "f-CMakePackage"
2 parents b33b485 + c5030bb commit 11efe8d

8 files changed

Lines changed: 3 additions & 196 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@ option(PHASAR_BUILD_IR "Build IR test code (default is OFF)" OFF)
5151

5252
option(PHASAR_BUILD_DOC "Build documentation" OFF)
5353

54-
option(PHASAR_DEBUG_LIBDEPS "Debug internal library dependencies (private linkage)" OFF)
55-
5654
option(BUILD_SHARED_LIBS "Build shared libraries (default is ON)" ON)
5755

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

109108
# JSON library
110109
option(JSON_BuildTests OFF)
@@ -234,8 +233,6 @@ if (PHASAR_BUILD_IR)
234233
add_subdirectory(test)
235234
endif()
236235

237-
set(INCLUDE_INSTALL_DIR include/ CACHE PATH "Install dir of headers")
238-
239236
# Install targets of phasar-llvm, other executables, and libraries are to be
240237
# found in the individual subdirectories of tools/
241238

@@ -276,33 +273,6 @@ install(DIRECTORY config/
276273
WORLD_READ
277274
)
278275

279-
install(EXPORT phasarTargets
280-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/phasar
281-
NAMESPACE phasar::
282-
FILE phasarTargets.cmake
283-
)
284-
285-
include(CMakePackageConfigHelpers)
286-
configure_package_config_file(
287-
Config.cmake.in
288-
phasarConfig.cmake
289-
INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/phasar
290-
PATH_VARS INCLUDE_INSTALL_DIR
291-
)
292-
293-
write_basic_package_version_file(
294-
${CMAKE_CURRENT_BINARY_DIR}/phasarConfigVersion.cmake
295-
VERSION 1.0.0
296-
COMPATIBILITY SameMajorVersion
297-
)
298-
299-
### Install Config and ConfigVersion files
300-
install(
301-
FILES "${CMAKE_CURRENT_BINARY_DIR}/phasarConfig.cmake"
302-
"${CMAKE_CURRENT_BINARY_DIR}/phasarConfigVersion.cmake"
303-
DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/phasar"
304-
)
305-
306276
# If the Phasar shared object libraries are not installed into a system folder
307277
# the so libs must be added manually to the linker search path and the linker
308278
# config must be updated as follows:

Config.cmake.in

Lines changed: 0 additions & 7 deletions
This file was deleted.

cmake/phasar_macros.cmake

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,6 @@ macro(add_phasar_library name)
161161
set(libkind)
162162
endif()
163163
add_library( ${name} ${libkind} ${srcs} )
164-
add_library( phasar::${name} ALIAS ${name} )
165164
if( LLVM_COMMON_DEPENDS )
166165
add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} )
167166
endif( LLVM_COMMON_DEPENDS )
@@ -173,11 +172,7 @@ macro(add_phasar_library name)
173172

174173
if(PHASAR_LINK_LIBS)
175174
foreach(lib ${PHASAR_LINK_LIBS})
176-
if(PHASAR_DEBUG_LIBDEPS)
177-
target_link_libraries(${name} LINK_PRIVATE ${lib})
178-
else()
179-
target_link_libraries(${name} LINK_PUBLIC ${lib})
180-
endif(PHASAR_DEBUG_LIBDEPS)
175+
target_link_libraries(${name} LINK_PRIVATE ${lib})
181176
endforeach(lib)
182177
endif(PHASAR_LINK_LIBS)
183178

@@ -194,7 +189,6 @@ macro(add_phasar_library name)
194189
endif(MSVC)
195190
install(TARGETS ${name}
196191
EXPORT LLVMExports
197-
EXPORT phasarTargets
198192
LIBRARY DESTINATION lib
199193
ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX})
200194
set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name})

examples/use-phasar-as-library/CMakeLists.txt

Lines changed: 0 additions & 41 deletions
This file was deleted.

examples/use-phasar-as-library/README.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

examples/use-phasar-as-library/myphasartool.cpp

Lines changed: 0 additions & 76 deletions
This file was deleted.

lib/PhasarClang/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ file(GLOB_RECURSE PHASARCLANG_SRC *.h *.cpp)
22

33
include_directories(${CLANG_INCLUDE_DIRS})
44

5-
set(PHASAR_LINK_LIBS
6-
phasar_utils
7-
)
8-
95
set(LLVM_LINK_COMPONENTS
106
Support
117
Core

lib/Utils/CMakeLists.txt

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ set(LLVM_LINK_COMPONENTS
1616
BitWriter
1717
)
1818

19+
1920
if(BUILD_SHARED_LIBS)
2021
add_phasar_library(phasar_utils
2122
SHARED
@@ -28,40 +29,11 @@ else()
2829
)
2930
endif()
3031

31-
set(LLVM_LINK_COMPONENTS
32-
coverage
33-
coroutines
34-
libdriver
35-
lto
36-
support
37-
analysis
38-
bitwriter
39-
core
40-
ipo
41-
irreader
42-
instcombine
43-
instrumentation
44-
linker
45-
objcarcopts
46-
scalaropts
47-
transformutils
48-
codegen
49-
vectorize
50-
)
51-
52-
llvm_map_components_to_libnames(llvm_libs
53-
${LLVM_LINK_COMPONENTS}
54-
)
55-
56-
target_include_directories(phasar_utils PUBLIC ${LLVM_INCLUDE_DIRS})
57-
target_compile_definitions(phasar_utils PUBLIC -DBOOST_LOG_DYN_LINK)
58-
5932
find_package(Boost COMPONENTS log REQUIRED)
6033
target_link_libraries(phasar_utils
6134
LINK_PUBLIC
6235
${Boost_LIBRARIES}
6336
${CMAKE_DL_LIBS}
64-
${llvm_libs}
6537
)
6638

6739
set_target_properties(phasar_utils

0 commit comments

Comments
 (0)