[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)
commite7038dfeaafbc177fec28e49f7b9924d6b1e01ab
tree8b8d90df047ce8f07472a45353e48431eda7cb43
parentadcf48fa358a6c6f78db43d4493f01d73ff2e2bd
[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.

llvm-svn: 201072
llvm/cmake/modules/AddLLVM.cmake