20 lines · plain
1if(LLVM_EXAMPLEIRTRANSFORMS_LINK_INTO_TOOLS)2 message(WARNING "Setting LLVM_EXAMPLEIRTRANSFORMS_LINK_INTO_TOOLS=ON only makes sense for testing purpose")3endif()4 5# The plugin expects to not link against the Support and Core libraries,6# but expects them to exist in the process loading the plugin. This doesn't7# work with DLLs on Windows (where a shared library can't have undefined8# references), so just skip this example on Windows.9if (NOT WIN32 AND NOT CYGWIN)10 add_llvm_pass_plugin(ExampleIRTransforms11 SimplifyCFG.cpp12 DEPENDS13 intrinsics_gen14 BUILDTREE_ONLY15 )16 17 install(TARGETS ${name} RUNTIME DESTINATION "${LLVM_EXAMPLES_INSTALL_DIR}")18 set_target_properties(${name} PROPERTIES FOLDER "Examples")19endif()20