mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 12:12:47 +01:00
6ffe0abe96
In the top-level CMakeLists.txt, we set CMAKE_BUILD_WITH_INSTALL_RPATH to ON, and then for the unit tests we set it to <test>/../../lib. This works for tests that live in unittest/<whatever>, but not for those that live in subdirectories e.g. unittest/Transforms/IPO or unittest/ExecutionEngine/Orc. When building with BUILD_SHARED_LIBRARIES, such tests don't manage to find their libraries. Since the tests are run from the build directory, it makes sense to set their RPATH for the build tree, rather than the install tree. This is the default in CMake since 2.6, so all we have to do is set CMAKE_BUILD_WITH_INSTALL_RPATH to OFF for the unit tests. llvm-svn: 280791
29 lines
778 B
CMake
29 lines
778 B
CMake
add_custom_target(UnitTests)
|
|
set_target_properties(UnitTests PROPERTIES FOLDER "Tests")
|
|
|
|
# People tend to run the tests _before_ installing, so we don't want the install
|
|
# rpath here.
|
|
set(CMAKE_BUILD_WITH_INSTALL_RPATH OFF)
|
|
|
|
function(add_llvm_unittest test_dirname)
|
|
add_unittest(UnitTests ${test_dirname} ${ARGN})
|
|
endfunction()
|
|
|
|
add_subdirectory(ADT)
|
|
add_subdirectory(Analysis)
|
|
add_subdirectory(AsmParser)
|
|
add_subdirectory(Bitcode)
|
|
add_subdirectory(CodeGen)
|
|
add_subdirectory(DebugInfo)
|
|
add_subdirectory(ExecutionEngine)
|
|
add_subdirectory(IR)
|
|
add_subdirectory(LineEditor)
|
|
add_subdirectory(Linker)
|
|
add_subdirectory(MC)
|
|
add_subdirectory(MI)
|
|
add_subdirectory(ObjectYAML)
|
|
add_subdirectory(Option)
|
|
add_subdirectory(ProfileData)
|
|
add_subdirectory(Support)
|
|
add_subdirectory(Transforms)
|