[CMake] Introduce llvm_add_library().
authorNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Feb 2014 09:05:11 +0000 (09:05 +0000)
committerNAKAMURA Takumi <geek4civic@gmail.com>
Mon, 10 Feb 2014 09:05:11 +0000 (09:05 +0000)
commit0eefad30d46364aeec0c5264153a02856d76e2c1
tree5bcfe7901acbb2cd767c9bae58d0b683864bc531
parent8cab11a9f8e23acc0ca3599a53aea19bf75ec1bf
[CMake] Introduce llvm_add_library().

  - MODULE;SHARED;STATIC
      STATIC by default w/o BUILD_SHARED_LIBS.
      SHARED by default w/  BUILD_SHARED_LIBS.
  - OUTPUT_NAME name
      Corresponds to OUTPUT_NAME in target properties.
  - DEPENDS targets...
      Same semantics as add_dependencies().
  - LINK_COMPONENTS components...
      Same as the variable LLVM_LINK_COMPONENTS.
  - LINK_LIBS lib_targets...
      Same semantics as target_link_libraries().
  - ADDITIONAL_HEADERS (implemented in LLVMProcessSources)
      May specify header files for IDE generators.

I suggest llvm_add_library() may be used for inter-project add_library stuff
and also suggest add_***_library() may be used project-specific.

Please be patient that llvm_add_library might be ambiguous against add_llvm_library.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201072 91177308-0d34-0410-b5e6-96231b3b80d8
cmake/modules/AddLLVM.cmake