pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
clang: since unit tests add a dependency, wrap them under "tests" option
Module Name: pkgsrc-wip
Committed By: Tobias Nygren <tnn%NetBSD.org@localhost>
Pushed By: tnn
Date: Wed Feb 24 18:27:14 2016 +0100
Changeset: 03aaae85d75dd71be9cf004ecf16b9e2c6a965b4
Modified Files:
clang-git/Makefile.common
clang/Makefile.common
Log Message:
clang: since unit tests add a dependency, wrap them under "tests" option
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=03aaae85d75dd71be9cf004ecf16b9e2c6a965b4
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
clang-git/Makefile.common | 15 +++++++++++++--
clang/Makefile.common | 15 +++++++++++++--
2 files changed, 26 insertions(+), 4 deletions(-)
diffs:
diff --git a/clang-git/Makefile.common b/clang-git/Makefile.common
index 4302fae..3f8155e 100644
--- a/clang-git/Makefile.common
+++ b/clang-git/Makefile.common
@@ -76,10 +76,21 @@ SUBST_SED.libcxx= -e 's,(Major >= 7 || Major == 0),(false),'
CMAKE_ARGS+= -DCLANG_DEFAULT_CXX_STDLIB:STRING="libstdc++"
.endif
+PKG_OPTIONS_VAR= PKG_OPTIONS.clang
+PKG_SUPPORTED_OPTIONS= tests
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mtests)
+CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=ON
+CMAKE_ARGS+= -DCLANG_INCLUDE_TESTS=ON
TEST_TARGET= clang-test
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
-# test dependency
-#.include "../../devel/googletest/buildlink3.mk"
+.include "../../devel/googletest/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF
+CMAKE_ARGS+= -DCLANG_INCLUDE_TESTS=OFF
+.endif
post-extract:
${RUN} mkdir -p ${WRKDIR}/build
diff --git a/clang/Makefile.common b/clang/Makefile.common
index 6214db7..eef4ab0 100644
--- a/clang/Makefile.common
+++ b/clang/Makefile.common
@@ -76,10 +76,21 @@ SUBST_SED.libcxx= -e 's,(Major >= 7 || (Major == 6 && Minor == 99 && Micro >= 4
CMAKE_ARGS+= -DCLANG_DEFAULT_CXX_STDLIB:STRING="libstdc++"
.endif
+PKG_OPTIONS_VAR= PKG_OPTIONS.clang
+PKG_SUPPORTED_OPTIONS= tests
+
+.include "../../mk/bsd.options.mk"
+
+.if !empty(PKG_OPTIONS:Mtests)
+CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=ON
+CMAKE_ARGS+= -DCLANG_INCLUDE_TESTS=ON
TEST_TARGET= clang-test
TEST_ENV+= LD_LIBRARY_PATH=${WRKDIR}/build/lib
-# test dependency
-#.include "../../devel/googletest/buildlink3.mk"
+.include "../../devel/googletest/buildlink3.mk"
+.else
+CMAKE_ARGS+= -DLLVM_INCLUDE_TESTS=OFF
+CMAKE_ARGS+= -DCLANG_INCLUDE_TESTS=OFF
+.endif
post-extract:
${RUN} mkdir -p ${WRKDIR}/build
Home |
Main Index |
Thread Index |
Old Index