aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJackBoosY <47264268+JackBoosY@users.noreply.github.com>2019-10-30 14:06:59 +0800
committerVictor Romero <romerosanchezv@gmail.com>2019-10-29 23:06:59 -0700
commit9c8e4cdc761658f8a9de73c93b40f677178edcb1 (patch)
treedbd0982d05c279c9a73aaf2b0a15a4f964221731
parentbe99ba1f5a7fa7bedf6b60afa6b8f060bd9b4eac (diff)
downloadvcpkg-9c8e4cdc761658f8a9de73c93b40f677178edcb1.tar.gz
vcpkg-9c8e4cdc761658f8a9de73c93b40f677178edcb1.zip
[llvm]Add features. (#8771)
* [llvm]Add features. * [llvm]Add ${FEATURE_OPTIONS}, set feature util to default feature.
-rw-r--r--ports/llvm/CONTROL13
-rw-r--r--ports/llvm/portfile.cmake13
2 files changed, 21 insertions, 5 deletions
diff --git a/ports/llvm/CONTROL b/ports/llvm/CONTROL
index b48d97660..e1569bdee 100644
--- a/ports/llvm/CONTROL
+++ b/ports/llvm/CONTROL
@@ -3,3 +3,16 @@ Version: 8.0.0-3
Homepage: https://llvm.org/
Description: The LLVM Compiler Infrastructure
Build-Depends: atlmfc (windows)
+Default-Features: tools, utils
+
+Feature: tools
+Description: Generate build targets for the LLVM tools.
+
+Feature: utils
+Description: Generate build targets for the LLVM utils.
+
+Feature: example
+Description: Generate build targets for the LLVM examples
+
+Feature: test
+Description: Generate build targets for the LLVM unit tests. \ No newline at end of file
diff --git a/ports/llvm/portfile.cmake b/ports/llvm/portfile.cmake
index 1315f06ac..61f45654c 100644
--- a/ports/llvm/portfile.cmake
+++ b/ports/llvm/portfile.cmake
@@ -44,15 +44,18 @@ vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+ tools LLVM_INCLUDE_TOOLS
+ utils LLVM_INCLUDE_UTILS
+ example LLVM_INCLUDE_EXAMPLES
+ test LLVM_INCLUDE_TESTS
+)
+
vcpkg_configure_cmake(
SOURCE_PATH ${SOURCE_PATH}
PREFER_NINJA
- OPTIONS
+ OPTIONS ${FEATURE_OPTIONS}
-DLLVM_TARGETS_TO_BUILD=X86
- -DLLVM_INCLUDE_TOOLS=ON
- -DLLVM_INCLUDE_UTILS=OFF
- -DLLVM_INCLUDE_EXAMPLES=OFF
- -DLLVM_INCLUDE_TESTS=OFF
-DLLVM_ABI_BREAKING_CHECKS=FORCE_OFF
-DLLVM_TOOLS_INSTALL_DIR=tools/llvm
-DLLVM_PARALLEL_LINK_JOBS=1