1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00
llvm-mirror/unittests/Passes/CMakeLists.txt
Fedor Sergeev 99f8b94bce [NewPM] teach -passes= to emit meaningful error messages
All the PassBuilder::parse interfaces now return descriptive StringError
instead of a plain bool. It allows to make -passes/aa-pipeline parsing
errors context-specific and thus less confusing.

TODO: ideally we should also make suggestions for misspelled pass names,
but that requires some extensions to PassBuilder.

Reviewed By: philip.pfaffe, chandlerc
Differential Revision: https://reviews.llvm.org/D53246

llvm-svn: 344685
2018-10-17 10:36:23 +00:00

31 lines
1006 B
CMake

# Needed by LLVM's CMake checks because this file defines multiple targets.
set(LLVM_OPTIONAL_SOURCES PluginsTest.cpp TestPlugin.cpp)
# If plugins are disabled, this test will disable itself at runtime. Otherwise,
# reconfiguring with plugins disabled will leave behind a stale executable.
if (LLVM_ENABLE_PLUGINS)
add_definitions(-DLLVM_ENABLE_PLUGINS)
endif()
set(LLVM_LINK_COMPONENTS Support Passes Core)
add_llvm_unittest(PluginsTests
PluginsTest.cpp
)
export_executable_symbols(PluginsTests)
target_link_libraries(PluginsTests PRIVATE LLVMTestingSupport)
set(LLVM_LINK_COMPONENTS)
add_llvm_loadable_module(TestPlugin
TestPlugin.cpp
)
# Put plugin next to the unit test executable.
set_output_directory(TestPlugin
BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
LIBRARY_DIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}
)
set_target_properties(TestPlugin PROPERTIES FOLDER "Tests")
add_dependencies(TestPlugin intrinsics_gen)
add_dependencies(PluginsTests TestPlugin)