xref: /netbsd-src/external/apache2/llvm/dist/clang/examples/PrintFunctionNames/CMakeLists.txt (revision 7330f729ccf0bd976a06f95fad452fe774fc7fd1)
1*7330f729Sjoerg# If we don't need RTTI or EH, there's no reason to export anything
2*7330f729Sjoerg# from the plugin.
3*7330f729Sjoergif( NOT MSVC ) # MSVC mangles symbols differently, and
4*7330f729Sjoerg               # PrintFunctionNames.export contains C++ symbols.
5*7330f729Sjoerg  if( NOT LLVM_REQUIRES_RTTI )
6*7330f729Sjoerg    if( NOT LLVM_REQUIRES_EH )
7*7330f729Sjoerg      set(LLVM_EXPORTED_SYMBOL_FILE ${CMAKE_CURRENT_SOURCE_DIR}/PrintFunctionNames.exports)
8*7330f729Sjoerg    endif()
9*7330f729Sjoerg  endif()
10*7330f729Sjoergendif()
11*7330f729Sjoerg
12*7330f729Sjoergadd_llvm_library(PrintFunctionNames MODULE PrintFunctionNames.cpp PLUGIN_TOOL clang)
13*7330f729Sjoerg
14*7330f729Sjoergif(LLVM_ENABLE_PLUGINS AND (WIN32 OR CYGWIN))
15*7330f729Sjoerg  set(LLVM_LINK_COMPONENTS
16*7330f729Sjoerg    Support
17*7330f729Sjoerg  )
18*7330f729Sjoerg  clang_target_link_libraries(PrintFunctionNames PRIVATE
19*7330f729Sjoerg    clangAST
20*7330f729Sjoerg    clangBasic
21*7330f729Sjoerg    clangFrontend
22*7330f729Sjoerg    )
23*7330f729Sjoergendif()
24